-
Notifications
You must be signed in to change notification settings - Fork 52
Add truncated props in Badge #2603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@channel.io/bezier-react': patch | ||
--- | ||
|
||
Add truncated props in the Badge | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import { AppleIcon } from '@channel.io/bezier-icons' | ||
import { type Meta, type StoryFn, type StoryObj } from '@storybook/react' | ||
|
||
import { Box } from '~/src/components/Box' | ||
|
||
import { Badge } from './Badge' | ||
import { type BadgeProps } from './Badge.types' | ||
|
||
|
@@ -14,6 +16,12 @@ const Template: StoryFn<BadgeProps> = ({ children, ...badgeProps }) => ( | |
<Badge {...badgeProps}>{children}</Badge> | ||
) | ||
|
||
const Truncated: StoryFn<BadgeProps> = ({ children, ...badgeProps }) => ( | ||
<Box width={200}> | ||
<Badge {...badgeProps}>{children}</Badge> | ||
</Box> | ||
) | ||
|
||
export const Primary: StoryObj<BadgeProps> = { | ||
render: Template, | ||
|
||
|
@@ -23,4 +31,24 @@ export const Primary: StoryObj<BadgeProps> = { | |
icon: AppleIcon, | ||
variant: 'default', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Primary에서도 배포버전에서 truncated: set object 의 control이 생깁니다. 없앨 예정입니다. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 혹시 작업 중이신가요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 네네 죄송합니다 제가 요즘 특히 일이 바빠서 주중에는 힘드네요 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 급한건 전혀 아니라 편하게 작업해주셔도 됩니다 🙏 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 반영했습니다~ |
||
}, | ||
argTypes: { | ||
truncated: { | ||
table: { | ||
disable: true, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
export const Secondary: StoryObj<BadgeProps> = { | ||
render: Truncated, | ||
|
||
args: { | ||
children: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', | ||
size: 'm', | ||
icon: AppleIcon, | ||
variant: 'default', | ||
truncated: true, | ||
}, | ||
name: 'Truncated', | ||
} |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반영했습니다!