import { Meta, StoryObj } from '@storybook/react-webpack5'; import { fn } from 'storybook/test'; import PrimitiveButton from '..'; const meta: Meta = { component: PrimitiveButton, title: 'Primitives/Button', tags: ['!manifest'], args: { children: 'Button text', onClick: fn(), onBlur: fn(), onFocus: fn(), onKeyDown: fn(), onMouseEnter: fn(), onMouseLeave: fn(), }, }; export default meta; type Story = StoryObj; export const Basic: Story = {}; export const WithLongName: Story = { args: { children: 'Button with a really long name', }, }; export const WithCustomClass: Story = { args: { className: 'custom-class', }, decorators: [ (Story) => (
), ], }; export const WithCustomStyle: Story = { args: { style: { color: 'red' }, }, }; export const Loading: Story = { args: { loading: true, }, render: (args) => ( {args.loading ? 'Loading...' : 'Button text'} ), }; export const Disabled: Story = { args: { disabled: true, }, };