Skip to content

Instantly share code, notes, and snippets.

@ghengeveld
Created December 14, 2020 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghengeveld/22903cdab4c9e16397db673f35fe3f8c to your computer and use it in GitHub Desktop.
Save ghengeveld/22903cdab4c9e16397db673f35fe3f8c to your computer and use it in GitHub Desktop.
Storybook lazy loading
export default {
title: 'Basics/Button',
loaders: [() => import('./Button')],
};
const Template = (args, { loaded }) => {
const { default: Button } = loaded;
return <Button {...args} />;
};
export const Primary = Template.bind({});
Primary.args = {
children: 'Primary button',
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment