overleaf/services/web/frontend/stories/badge.stories.tsx
Alf Eaton f205d1f31d Merge pull request #12621 from overleaf/ii-history-react-delete-labels
[web] Delete history tags

GitOrigin-RevId: 0a2846bbb3e99ef632b9192a9f8c04f702645506
2023-04-19 08:02:47 +00:00

53 lines
973 B
TypeScript

import Badge from '../js/shared/components/badge'
import Icon from '../js/shared/components/icon'
type Args = React.ComponentProps<typeof Badge>
export const NewBadge = (args: Args) => {
return <Badge {...args} />
}
export const NewBadgePrepend = (args: Args) => {
return <Badge prepend={<Icon type="tag" fw />} {...args} />
}
export const NewBadgeWithCloseButton = (args: Args) => {
return (
<Badge
prepend={<Icon type="tag" fw />}
closeButton
onClose={() => alert('Close triggered!')}
{...args}
/>
)
}
export default {
title: 'Shared / Components / Badge',
component: Badge,
args: {
children: 'content',
},
argTypes: {
prepend: {
table: {
disable: true,
},
},
closeButton: {
table: {
disable: true,
},
},
onClose: {
table: {
disable: true,
},
},
closeBtnProps: {
table: {
disable: true,
},
},
},
}