Skip to content

Commit

Permalink
fix(icon): redefine size values
Browse files Browse the repository at this point in the history
  • Loading branch information
andresin87 committed Mar 31, 2023
1 parent 8f2379f commit 228ba60
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/components/icon/src/Icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Default: StoryFn = _args => (
</Icon>
)

const sizes = ['small', 'medium'] as const
const sizes = ['sm', 'md', 'lg'] as const

export const Sizes: StoryFn = _args => (
<>
Expand Down
2 changes: 1 addition & 1 deletion packages/components/icon/src/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface IconProps extends IconVariantsProps, React.SVGProps<SVGElement>
label?: string
}

export function Icon({ label, className, size = 'small', children, ...others }: IconProps) {
export function Icon({ label, className, size = 'md', children, ...others }: IconProps) {
const child = React.Children.only(children)

return (
Expand Down
5 changes: 3 additions & 2 deletions packages/components/icon/src/Icon.variants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { cva, VariantProps } from 'class-variance-authority'
export const iconVariants = cva(['fill-current'], {
variants: {
size: {
small: ['w-sz-20', 'h-sz-20'],
medium: ['w-sz-28', 'h-sz-28'],
sm: ['w-sz-16', 'h-sz-16'],
md: ['w-sz-24', 'h-sz-24'],
lg: ['w-sz-32', 'h-sz-32'],
},
},
})
Expand Down

0 comments on commit 228ba60

Please sign in to comment.