Skip to content

Commit

Permalink
feat(icon): change normal to m
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwooseong committed Feb 13, 2024
1 parent 8dd616d commit 297b174
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .changeset/gold-gorillas-shout.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ The properties that change are:

Also, `SpinnerThickness` props of `Spinner` is not supported any more.

When changed to string literal type, it is changed to the kebab-cased value of enum. e.g. `TooltipPosition.TopCenter` -> `top-center`. Among the above enums, `TextAreaHeight` is converted to number literal type. e.g. `TextAreaHeight.Row16` -> `16`
When changed to string literal type, it is changed to the kebab-cased value of enum. e.g. `TooltipPosition.TopCenter` -> `top-center`. Among the above enums, `TextAreaHeight` is converted to number literal type. e.g. `TextAreaHeight.Row16` -> `16`, and `IconSize.normal` is converted to `m` for consistency
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const ENUM_TRANSFORM_MAP: EnumTransformMap = {
IconSize: {
XL: 'xl',
L: 'l',
Normal: 'normal',
Normal: 'm',
S: 's',
XS: 'xs',
XXS: 'xxs',
Expand Down
2 changes: 1 addition & 1 deletion packages/bezier-react/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function getIconSize(size: ButtonSize) {
s: 'xs',
m: 's',
l: 's',
xl: 'normal',
xl: 'm',
} as const)[size]
}

Expand Down
26 changes: 13 additions & 13 deletions packages/bezier-react/src/components/Icon/Icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default meta
export const Playground: StoryObj<IconProps> = {
args: {
source: ChannelIcon,
size: 'normal',
size: 'm',
color: 'bg-black-darker',
},
}
Expand Down Expand Up @@ -99,7 +99,7 @@ export const AllIcons: StoryObj<Omit<IconProps, 'source'>> = {
),

args: {
size: 'normal',
size: 'm',
color: 'bg-black-darkest',
},
}
Expand Down Expand Up @@ -168,7 +168,7 @@ export const Overview: StoryFn<{}> = () => (
'xxs',
'xs',
's',
'normal',
'm',
'l',
'xl',
] as const).map((size) => (
Expand Down Expand Up @@ -222,19 +222,19 @@ export const UsageColor: StoryObj<{}> = {
export const UsageSize: StoryFn<{}> = () => (
<LegacyVStack spacing={16}>
{ ([
{ label: 'XXXS', size: 'xxxs' },
{ label: 'XXS', size: 'xxs' },
{ label: 'XS', size: 'xs' },
{ label: 'S', size: 's' },
{ label: 'Normal', size: 'normal' },
{ label: 'L', size: 'l' },
{ label: 'XL', size: 'xl' },
] as const).map(({ label, size }) => (
'xxxs',
'xxs',
'xs',
's',
'm',
'l',
'xl',
] as const).map((size) => (
<LegacyStackItem key={size}>
<LegacyHStack spacing={24}>
<LegacyStackItem size={100}>
<LegacyStackItem size={30}>
<Text typo="13" color="txt-black-darkest">
{ `${label} (${size}x${size})` }
{ size }
</Text>
</LegacyStackItem>
<LegacyStackItem>
Expand Down
4 changes: 2 additions & 2 deletions packages/bezier-react/src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const ICON_TEST_ID = 'bezier-icon'
const getSizeValue = (size: IconSize) => ({
xl: 44,
l: 36,
normal: 24,
m: 24,
s: 20,
xs: 16,
xxs: 12,
Expand All @@ -39,7 +39,7 @@ export const Icon = memo(forwardRef<SVGSVGElement, IconProps>(function Icon(

const {
className,
size = 'normal',
size = 'm',
color,
source: SourceElement,
style,
Expand Down
2 changes: 1 addition & 1 deletion packages/bezier-react/src/components/Icon/Icon.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
export type IconSize =
| 'xl'
| 'l'
| 'normal'
| 'm'
| 's'
| 'xs'
| 'xxs'
Expand Down

0 comments on commit 297b174

Please sign in to comment.