Skip to content

Commit

Permalink
docs(storybook): add stories for button
Browse files Browse the repository at this point in the history
add new stories for button component

resolves #40

Signed-off-by: Niloy Sikdar <[email protected]>
  • Loading branch information
niloysikdar committed Jul 4, 2022
1 parent be32759 commit cb22cb1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/components/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { ComponentStory, ComponentMeta } from '@storybook/react';

import { Button } from './Button';

export default {
component: Button,
} as ComponentMeta<typeof Button>;

//“template” of how args map to rendering
const Template: ComponentStory<typeof Button> = (args) => (
<table>
<tbody>
<tr>
<Button {...args} />
</tr>
</tbody>
</table>
);

export const Default = Template.bind({});

Default.args = {
children: 'Click here',
href: 'https://github.com/leopardslab/react-email',
style: {
backgroundColor: 'blue',
color: 'white',
},
};

0 comments on commit cb22cb1

Please sign in to comment.