docs/snippets/react/button-story-using-args.ts.mdx
```ts
// Button.stories.ts|tsx
import React from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react';
import { Button } from './Button';
export default {
/* π The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
} as ComponentMeta<typeof Button>;
//π We create a βtemplateβ of how args map to rendering
const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;
//π Each story then reuses that template
export const Primary = Template.bind({});
Primary.args = { backgroundColor: '#ff0', label: 'Button' };
export const Secondary = Template.bind({});
Secondary.args = { ...Primary.args, label: 'ππππ―' };
export const Tertiary = Template.bind({});
Tertiary.args = { ...Primary.args, label: 'ππππ€' };
```