storybook/docs/snippets/react/configure-mock-provider-with-story-parameter.ts-4-9.mdx
2024-04-30 22:21:31 -06:00

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',
},
};
```