Header.stories.js 655 B

123456789101112131415161718192021222324252627
  1. import { createHeader } from './Header';
  2. export default {
  3. title: 'Example/Header',
  4. parameters: {
  5. // More on Story layout: https://storybook.js.org/docs/html/configure/story-layout
  6. layout: 'fullscreen',
  7. },
  8. // More on argTypes: https://storybook.js.org/docs/html/api/argtypes
  9. argTypes: {
  10. onLogin: { action: 'onLogin' },
  11. onLogout: { action: 'onLogout' },
  12. onCreateAccount: { action: 'onCreateAccount' },
  13. },
  14. };
  15. const Template = (args) => createHeader(args);
  16. export const LoggedIn = Template.bind({});
  17. LoggedIn.args = {
  18. user: {
  19. name: 'Jane Doe',
  20. },
  21. };
  22. export const LoggedOut = Template.bind({});
  23. LoggedOut.args = {};