2024-05-27 08:46:48 -04:00
|
|
|
import BS3Badge from '@/shared/components/badge'
|
2024-04-19 08:30:23 -04:00
|
|
|
import Icon from '@/shared/components/icon'
|
|
|
|
import type { Meta, StoryObj } from '@storybook/react'
|
|
|
|
|
2024-05-27 08:46:48 -04:00
|
|
|
const meta: Meta<typeof BS3Badge> = {
|
2024-04-19 08:30:23 -04:00
|
|
|
title: 'Shared / Components / Badge / Bootstrap 3',
|
2024-05-27 08:46:48 -04:00
|
|
|
component: BS3Badge,
|
2024-04-19 08:30:23 -04:00
|
|
|
parameters: {
|
|
|
|
bootstrap5: false,
|
|
|
|
},
|
|
|
|
args: {
|
|
|
|
children: 'Badge',
|
|
|
|
},
|
|
|
|
argTypes: {
|
|
|
|
prepend: {
|
|
|
|
table: {
|
|
|
|
disable: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
bsStyle: {
|
2024-05-27 08:46:48 -04:00
|
|
|
options: ['info', 'primary', 'warning', 'danger'],
|
2024-04-19 08:30:23 -04:00
|
|
|
control: { type: 'radio' },
|
|
|
|
},
|
|
|
|
className: {
|
|
|
|
table: {
|
|
|
|
disable: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
export default meta
|
|
|
|
|
2024-05-27 08:46:48 -04:00
|
|
|
type Story = StoryObj<typeof BS3Badge>
|
2024-04-19 08:30:23 -04:00
|
|
|
|
|
|
|
export const BadgeDefault: Story = {
|
|
|
|
render: args => {
|
|
|
|
return (
|
2024-05-27 08:46:48 -04:00
|
|
|
<div className="small">
|
|
|
|
<BS3Badge {...args} />
|
|
|
|
</div>
|
2024-04-19 08:30:23 -04:00
|
|
|
)
|
|
|
|
},
|
|
|
|
}
|
|
|
|
BadgeDefault.args = {
|
2024-10-10 03:26:18 -04:00
|
|
|
bsStyle: meta.argTypes!.bsStyle!.options![0],
|
2024-04-19 08:30:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export const BadgePrepend: Story = {
|
|
|
|
render: args => {
|
|
|
|
return (
|
2024-05-27 08:46:48 -04:00
|
|
|
<div className="small">
|
|
|
|
<BS3Badge prepend={<Icon type="star" fw />} {...args} />
|
|
|
|
</div>
|
2024-04-19 08:30:23 -04:00
|
|
|
)
|
|
|
|
},
|
|
|
|
}
|
|
|
|
BadgePrepend.args = {
|
2024-10-10 03:26:18 -04:00
|
|
|
bsStyle: meta.argTypes!.bsStyle!.options![0],
|
2024-04-19 08:30:23 -04:00
|
|
|
}
|