설명 없음

Editor.stories.tsx 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import React from 'react';
  2. import { storiesOf } from '@storybook/react';
  3. import { action } from '@storybook/addon-actions';
  4. import { withInfo } from "@storybook/addon-info";
  5. import { withKnobs, number, boolean, select } from "@storybook/addon-knobs";
  6. import { addReadme } from 'storybook-readme';
  7. import RichTextEditor from '@components/Editor/RichTextEditor';
  8. import RichTextEditorForSlate from '@components/Editor/RichTextEditorForSlate';
  9. import { BarftEditorPage } from '@components/Editor/BraftEditor';
  10. const stories = storiesOf('Editor', module);
  11. stories.addDecorator((storyFn) => <div style={{padding: "0px 40px"}}>{storyFn()}</div>)
  12. stories.addDecorator(withKnobs);
  13. stories.addDecorator(withInfo);
  14. stories.addDecorator(addReadme);
  15. stories.add(
  16. 'RichTextEditor',
  17. () => (
  18. <RichTextEditor />
  19. ),
  20. {
  21. info: {
  22. inline: true,
  23. },
  24. notes: 'A very simple example of addon notes',
  25. }
  26. )
  27. stories.add(
  28. 'RichTextEditorForSlate',
  29. () => (
  30. <RichTextEditorForSlate />
  31. ),
  32. {
  33. info: {
  34. inline: true,
  35. },
  36. notes: 'A very simple example of addon notes',
  37. }
  38. )
  39. stories.add(
  40. 'BraftEditor',
  41. () => (
  42. <BarftEditorPage />
  43. ),
  44. {
  45. info: {
  46. inline: true,
  47. },
  48. notes: 'A very simple example of addon notes',
  49. }
  50. )