12345678910111213141516171819202122232425262728293031323334353637383940 |
- import React from 'react';
- 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,
- // 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
- const Template = (args) => <Button {...args} />;
- export const Primary = Template.bind({});
- // More on args: https://storybook.js.org/docs/react/writing-stories/args
- Primary.args = {
- primary: true,
- label: 'Bouton primaire',
- };
- export const Secondary = Template.bind({});
- Secondary.args = {
- label: 'Bouton secondaire',
- };
- export const Large = Template.bind({});
- Large.args = {
- size: 'large',
- label: 'Bouton de grande taille',
- };
- export const Small = Template.bind({});
- Small.args = {
- size: 'small',
- label: 'Bouton miniature',
- };
|