Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. /* path: .storybook/config.js */
  2.  
  3. const req = require.context("./../packages", true, /.stories.tsx$/);
  4.  
  5. import { configure, addDecorator } from "@storybook/react";
  6. import { withKnobs } from "@storybook/addon-knobs/react";
  7. import { withA11y } from "@storybook/addon-a11y";
  8. import { withOptions } from "@storybook/addon-options";
  9. import { withInfo } from "@storybook/addon-info";
  10. import { iconDecorator } from "../decorators/iconDecorator";
  11. import { themeDecorator } from "../decorators/themeDecorator"; // change 1 of 2
  12. require("../packages/shared/styles/global").injectStorybookResetCss();
  13.  
  14. addDecorator(themeDecorator); // change 2 of 2
  15. addDecorator(iconDecorator);
  16. addDecorator(withKnobs);
  17. addDecorator(withA11y);
  18. addDecorator(
  19. withInfo({
  20. inline: true
  21. })
  22. );
  23. withOptions({
  24. name: "Mesosphere UI Kit",
  25. url: "#",
  26. goFullScreen: false,
  27. showLeftPanel: true,
  28. showDownPanel: true,
  29. showSearchBox: false,
  30. downPanelInRight: true
  31. });
  32.  
  33. function loadStories() {
  34. req.keys().forEach(filename => req(filename));
  35. }
  36.  
  37. configure(loadStories, module);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement