No Description

Editor.stories.tsx 842B

1234567891011121314151617181920212223242526272829
  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 { BarftEditorPage } from '@components/Editor/BraftEditor';
  8. import EditorData from './data/articleData.json';
  9. const stories = storiesOf('Editor', module);
  10. stories.addDecorator((storyFn) => <div style={{padding: "0px 40px"}}>{storyFn()}</div>)
  11. stories.addDecorator(withKnobs);
  12. stories.addDecorator(withInfo);
  13. stories.addDecorator(addReadme);
  14. stories.add(
  15. 'BraftEditor',
  16. () => (
  17. <BarftEditorPage value={EditorData.text} />
  18. ),
  19. {
  20. info: {
  21. inline: true,
  22. },
  23. notes: 'A very simple example of addon notes',
  24. }
  25. )