Files
Verso/services/web/frontend/stories/shared/button.stories.tsx
T
Alf EatonandCopybot ce4ca192ee Upgrade Storybook to v10 (#30442)
GitOrigin-RevId: 9f51624bc2b34b6746d1854969173b44c9c9cf9a
2026-04-22 08:06:26 +00:00

61 lines
1.4 KiB
TypeScript

import { Meta } from '@storybook/react-webpack5'
import { figmaDesignUrl } from '../../../.storybook/utils/figma-design-url'
import OLButton from '@/shared/components/ol/ol-button'
type Args = React.ComponentProps<typeof OLButton>
export const NewButton = (args: Args) => {
return <OLButton {...args} />
}
export const ButtonWithLeadingIcon = (args: Args) => {
return <OLButton leadingIcon="add" {...args} />
}
export const ButtonWithTrailingIcon = (args: Args) => {
return <OLButton trailingIcon="add" {...args} />
}
export const ButtonWithIcons = (args: Args) => {
return <OLButton trailingIcon="add" leadingIcon="add" {...args} />
}
const meta: Meta<typeof OLButton> = {
title: 'Shared / Components / Button',
component: OLButton,
args: {
children: 'Button',
disabled: false,
isLoading: false,
},
argTypes: {
size: {
control: 'radio',
options: ['lg', 'md', 'sm'],
},
variant: {
control: 'radio',
options: [
'primary',
'secondary',
'ghost',
'danger',
'danger-ghost',
'premium',
'premium-secondary',
'link',
],
},
},
parameters: {
controls: {
include: ['children', 'disabled', 'isLoading', 'size', 'variant'],
},
...figmaDesignUrl(
'https://www.figma.com/design/V7Ogph1Ocs4ux2A4WMNAh7/Overleaf---Components?node-id=3458-22412&m=dev'
),
},
}
export default meta