mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 03:41:06 +08:00
23 lines
404 B
Plaintext
23 lines
404 B
Plaintext
```ts
|
|
// Button.stories.ts
|
|
import { Meta, StoryObj } from '@storybook/react';
|
|
|
|
import { Button } from './Button';
|
|
|
|
const meta = {
|
|
component: Button,
|
|
} satisfies Meta<typeof Button>;
|
|
export default meta;
|
|
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
// Wrapped in light theme
|
|
export const Default: Story = {};
|
|
|
|
// Wrapped in dark theme
|
|
export const Dark: Story = {
|
|
parameters: {
|
|
theme: 'dark',
|
|
},
|
|
};
|
|
``` |