How to use the storybook-readme.doc function in storybook-readme

To help you get started, we’ve selected a few storybook-readme examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github psychobolt / react-pie-menu / stories / index.js View on Github external
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';
import { Button, Welcome } from '@storybook/react/demo';
import { doc } from 'storybook-readme';

import Flexbox from './Layout/Flexbox';
import UserPage from './UserPage';
import Readme from '../README.md';

storiesOf('Documentation', module)
  .add('Readme', doc(Readme))
  .add('Welcome to Storybook', () => );

storiesOf('Button', module)
  .add('with text', () => (
    <button>
      {'Hello Button'}
    </button>
  ))
  .add('with some emoji', () =&gt; (
    <button>
      <span aria-label="emojis" role="img">
        😀 😎 👍 💯
      </span>
    </button>
  ));
github ConsenSys / rimble-ui / example / src / stories / 1-Index / index.stories.js View on Github external
0.1





        
      
    
  ))
  .add('Installation', doc(installing))
  .add('Theming', doc(theme));
github tuchk4 / storybook-readme / packages / example-vue / stories / index.js View on Github external
render() {
      return MyButton rendered with JSX;
    },
  }))
);

storiesOf('As JSX/As Decorator', module)
  .addDecorator(withDocs(ButtonReadme))
  .add('Button', () =&gt; ({
    components: { MyButton },
    render() {
      return MyButton rendered with JSX;
    },
  }));

storiesOf('Doc', module).add('Common', doc(ButtonReadme));
github commercetools / ui-kit / philosophy / guide.story.js View on Github external
import { storiesOf } from '@storybook/react';
import { doc } from 'storybook-readme';
import Forms from './FORMS.md';
import Inputs from './INPUTS.md';
import Fields from './FIELDS.md';

storiesOf('Philosophy|Guide', module)
  .addParameters({ options: { showAddonPanel: false } })
  .add('Forms', doc(Forms))
  .add('Inputs', doc(Inputs))
  .add('Fields', doc(Fields));
github commercetools / ui-kit / philosophy / guide.story.js View on Github external
import { storiesOf } from '@storybook/react';
import { doc } from 'storybook-readme';
import Forms from './FORMS.md';
import Inputs from './INPUTS.md';
import Fields from './FIELDS.md';

storiesOf('Philosophy|Guide', module)
  .addParameters({ options: { showAddonPanel: false } })
  .add('Forms', doc(Forms))
  .add('Inputs', doc(Inputs))
  .add('Fields', doc(Fields));
github wellcometrust / wellcomecollection.org / cardigan_beta / stories / docs / principles / principles.js View on Github external
import { storiesOf } from '@storybook/react';
import principlesReadme from './README.md';
import { doc }  from 'storybook-readme';

const stories = storiesOf('Documentation', module);

stories
  .add('Principles', doc(principlesReadme));
github joepuzzo / informed / stories / Form / Props / index.js View on Github external
import React from 'react';
import readme from './README.md';
import { doc } from 'storybook-readme';

export default doc(readme);
github commercetools / ui-kit / philosophy / guide.story.js View on Github external
import { storiesOf } from '@storybook/react';
import { doc } from 'storybook-readme';
import Forms from './FORMS.md';
import Inputs from './INPUTS.md';
import Fields from './FIELDS.md';

storiesOf('Philosophy|Guide', module)
  .addParameters({ options: { showAddonPanel: false } })
  .add('Forms', doc(Forms))
  .add('Inputs', doc(Inputs))
  .add('Fields', doc(Fields));
github ConsenSys / rimble-ui / example / src / stories / 1-Index / index.stories.js View on Github external
0.1





        
      
    
  ))
  .add('Installation', doc(installing))
  .add('Theming', doc(theme));
github tuchk4 / storybook-readme / packages / example-react / stories / withOldApi.js View on Github external
import Button from '../components/Button';

import ButtonReadme from '../components/Button/README.md';
import ButtonUsage from '../components/Button/USAGE.md';

storiesOf('Old Api', module).add(
  'withDocs hoc',
  withDocs(ButtonReadme, () =&gt; <button label="{'Hello">)
);

storiesOf('Old Api', module)
  .addDecorator(withDocs(ButtonReadme))
  .add('withDocs decorator', () =&gt; </button><button label="{'Hello">);

storiesOf('Old Api', module).add('doc', doc(ButtonReadme));

storiesOf('Old Api', module).add(
  'withReadme hoc',
  withReadme(ButtonReadme, () =&gt; </button><button label="{'Hello">)
);

storiesOf('Old Api', module)
  .addDecorator(withReadme(ButtonReadme))
  .add('withReadme decorator', () =&gt; </button><button label="{'Hello">);
</button>