storybook/docs/snippets/common/button-story-hoisted.ts.mdx
2022-11-30 20:25:47 +00:00

24 lines
699 B
Plaintext

```ts
// Button.stories.ts|tsx
import { Button as ButtonComponent } from './Button';
// Replace your-framework with the name of your framework
import type { Meta, Storybook } from '@storybook/your-framework';
const meta: Meta<typeof ButtonComponent> = {
/* 👇 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: 'Design System/Atoms/Button',
component: ButtonComponent,
};
export default meta;
type Story = StoryObj<typeof ButtonComponent>;
// This is the only named export in the file, and it matches the component name
export const Button: Story = {};
```