Skip to content

Commit

Permalink
feat: add size and color to the badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Katrin-kudryash committed Aug 15, 2023
1 parent 312ff3d commit 1b16a21
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { gray7, gray9, radiusL } from '@taskany/colors';

interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
children: React.ReactNode;
size?: 's' | 'm';
size?: 's' | 'm' | 'l' | 'xl';
color?: string;
className?: string;

Expand All @@ -31,6 +31,12 @@ const StyledBadge = styled.div<{ size: BadgeProps['size']; color?: BadgeProps['c
`,
m: `
padding: 2px 8px;
`,
l: `
padding: 3px 12px;
`,
xl: `
padding: 4px 16px;
`,
}[size]}
Expand Down

0 comments on commit 1b16a21

Please sign in to comment.