mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 21:21:47 +08:00
42 lines
922 B
JavaScript
42 lines
922 B
JavaScript
import { Button } from './Button';
|
|
|
|
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
export default {
|
|
title: 'Example/Button',
|
|
component: Button,
|
|
// This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/react/writing-docs/docs-page
|
|
tags: ['docsPage'],
|
|
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
argTypes: {
|
|
backgroundColor: { control: 'color' },
|
|
},
|
|
};
|
|
|
|
// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
|
|
export const Primary = {
|
|
args: {
|
|
primary: true,
|
|
label: 'Button',
|
|
},
|
|
};
|
|
|
|
export const Secondary = {
|
|
args: {
|
|
label: 'Button',
|
|
},
|
|
};
|
|
|
|
export const Large = {
|
|
args: {
|
|
size: 'large',
|
|
label: 'Button',
|
|
},
|
|
};
|
|
|
|
export const Small = {
|
|
args: {
|
|
size: 'small',
|
|
label: 'Button',
|
|
},
|
|
};
|