Skip to content

Commit

Permalink
docs(storybook): typography stories
Browse files Browse the repository at this point in the history
add stories for typography using storybook

resolves #41

Signed-off-by: Niloy Sikdar <niloysikdar30@gmail.com>
  • Loading branch information
niloysikdar committed Jul 1, 2022
1 parent 4f1fbad commit e02565c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/components/Typography/Typography.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { ComponentStory, ComponentMeta } from '@storybook/react';

import { Typography } from './Typography';

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

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

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

Default.args = {
children: 'This is a Typography',
variant: 'h2',
};

0 comments on commit e02565c

Please sign in to comment.