mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
27 lines
609 B
Plaintext
27 lines
609 B
Plaintext
```ts
|
|
// Checkbox.stories.ts|tsx
|
|
|
|
// Replace your-framework with the name of your framework
|
|
import type { Meta, StoryObj } from '@storybook/your-framework';
|
|
|
|
import { Checkbox } from './Checkbox';
|
|
|
|
const meta: Meta<typeof Checkbox> = {
|
|
/* 👇 The title prop is optional.
|
|
* See https://storybook.js.org/docs/7.0/react/configure/overview#configure-story-loading
|
|
* to learn how to generate automatic titles
|
|
*/
|
|
title: 'Checkbox',
|
|
component: Checkbox,
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof Checkbox>;
|
|
|
|
export const Unchecked: Story = {
|
|
args: {
|
|
label: 'Unchecked',
|
|
},
|
|
};
|
|
```
|