mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
54 lines
973 B
TypeScript
54 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,
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
}
|