mirror of https://github.com/buster-so/buster.git
46 lines
831 B
TypeScript
46 lines
831 B
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
|
import { Switch } from './AppSwitch';
|
|
|
|
const meta: Meta<typeof Switch> = {
|
|
title: 'Base/Switch',
|
|
component: Switch,
|
|
argTypes: {
|
|
className: { control: 'text' },
|
|
defaultChecked: { control: 'boolean' },
|
|
disabled: { control: 'boolean' },
|
|
checked: { control: 'boolean' }
|
|
}
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof Switch>;
|
|
|
|
export const Default: Story = {
|
|
args: {}
|
|
};
|
|
|
|
export const Checked: Story = {
|
|
args: {
|
|
defaultChecked: true
|
|
}
|
|
};
|
|
|
|
export const Disabled: Story = {
|
|
args: {
|
|
disabled: true
|
|
}
|
|
};
|
|
|
|
export const DisabledChecked: Story = {
|
|
args: {
|
|
disabled: true,
|
|
defaultChecked: true
|
|
}
|
|
};
|
|
|
|
export const WithCustomClassName: Story = {
|
|
args: {
|
|
className: 'bg-blue-500 data-[state=checked]:bg-green-500'
|
|
}
|
|
};
|