Skip to content

Commit

Permalink
fix(email story): change format
Browse files Browse the repository at this point in the history
change the config to take children from args

Signed-off-by: Niloy Sikdar <niloysikdar30@gmail.com>
  • Loading branch information
niloysikdar committed Jun 19, 2022
1 parent e37b1d3 commit a86e62b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/components/Email/Email.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ export default {
component: Email,
} as ComponentMeta<typeof Email>;

export const MyEmail: ComponentStory<typeof Email> = () => (
<Email>
<h2>Hello World</h2>
</Email>
);
//“template” of how args map to rendering
const Template: ComponentStory<typeof Email> = (args) => <Email {...args} />;

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

MyEmail.args = {
children: <h2>Hello world</h2>,
};

0 comments on commit a86e62b

Please sign in to comment.