mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:32:02 +08:00
16 lines
500 B
Plaintext
16 lines
500 B
Plaintext
```ts
|
|
// Button.stories.ts | Button.stories.tsx
|
|
|
|
import { Meta } from '@storybook/react';
|
|
|
|
import { Button } from './Button';
|
|
|
|
export default {
|
|
component: Button,
|
|
title: 'Components/Button',
|
|
} as Meta;
|
|
|
|
export const Primary: React.VFC<{}> = () => <Button background="#ff0" label="Button" />;
|
|
export const Secondary: React.VFC<{}> = () => <Button background="#ff0" label="😄👍😍💯" />;
|
|
export const Tertiary: React.VFC<{}> = () => <Button background="#ff0" label="📚📕📈🤓" />;
|
|
``` |