import styled from '@emotion/styled'; import OrganizationAvatar from 'sentry/components/avatar/organizationAvatar'; import {IconWarning} from 'sentry/icons'; import {tn} from 'sentry/locale'; import space from 'sentry/styles/space'; import {OrganizationSummary} from 'sentry/types'; type Props = { organization: OrganizationSummary; className?: string; /** * Show the project count under the organization name. */ projectCount?: number; }; const SidebarOrgSummary = styled(({organization, projectCount, ...props}: Props) => (
{organization.status.id === 'pending_deletion' ? ( ) : ( )}
{organization.name} {!!projectCount && ( {tn('%s project', '%s projects', projectCount)} )}
))` display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: ${space(1)}; align-items: center; padding: ${space(1)} ${p => p.theme.sidebar.menuSpacing}; `; const Name = styled('div')<{pendingDeletion: boolean}>` color: ${p => (p.pendingDeletion ? p.theme.subText : p.theme.textColor)}; font-size: ${p => p.theme.fontSizeLarge}; line-height: 1.1; font-weight: bold; ${p => p.theme.overflowEllipsis}; `; const ProjectCount = styled('div')` color: ${p => p.theme.subText}; font-size: ${p => p.theme.fontSizeMedium}; line-height: 1; margin-top: ${space(0.5)}; ${p => p.theme.overflowEllipsis}; `; const PendingDeletionAvatar = styled('div')` height: 36px; width: 36px; display: flex; align-items: center; justify-content: center; border: 2px dashed ${p => p.theme.gray200}; border-radius: 4px; `; PendingDeletionAvatar.defaultProps = { children: , }; export default SidebarOrgSummary;