feat: add Settings/Accounts/Emails Emails Sync section accounts list (#2957)

Closes #2888

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Thaïs
2023-12-13 17:37:12 +01:00
committed by GitHub
parent 9eddaffac4
commit 856b78abc7
14 changed files with 211 additions and 79 deletions

View File

@ -5,6 +5,7 @@ import { themeColorSchema } from '@/ui/theme/utils/themeColorSchema';
const StyledStatus = styled.h3<{
color: ThemeColor;
weight: 'regular' | 'medium';
}>`
align-items: center;
background: ${({ color, theme }) => theme.tag.background[color]};
@ -13,7 +14,7 @@ const StyledStatus = styled.h3<{
display: inline-flex;
font-size: ${({ theme }) => theme.font.size.md};
font-style: normal;
font-weight: ${({ theme }) => theme.font.weight.regular};
font-weight: ${({ theme, weight }) => theme.font.weight[weight]};
gap: ${({ theme }) => theme.spacing(1)};
height: ${({ theme }) => theme.spacing(5)};
margin: 0;
@ -42,13 +43,21 @@ type StatusProps = {
color: ThemeColor;
text: string;
onClick?: () => void;
weight?: 'regular' | 'medium';
};
export const Status = ({ className, color, text, onClick }: StatusProps) => (
export const Status = ({
className,
color,
text,
onClick,
weight = 'regular',
}: StatusProps) => (
<StyledStatus
className={className}
color={themeColorSchema.catch('gray').parse(color)}
onClick={onClick}
weight={weight}
>
<StyledContent>{text}</StyledContent>
</StyledStatus>