How to use the @kadira/storybook.storiesOf function in @kadira/storybook

To help you get started, we’ve selected a few @kadira/storybook 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 sm-react / storybook-chapters / example / basic / src / ThemeSwitcher.story.jsx View on Github external
/* eslint-disable import/no-extraneous-dependencies */

import React from 'react';
import { storiesOf } from '@kadira/storybook';
import { setOptions } from '@kadira/storybook-addon-options';

import ThemeSwitcher from './ThemeSwitcher';
import App from './App';

storiesOf('Theme Switcher', module)
    .addDecorator((story) => {
        const storyKind = story();
        return (
          <div style="{{">
            <div style="{{">
              {storyKind}
            </div>
          </div>);
    })
    .add('Component', () =&gt; {
        setOptions({
            name: 'React Theme Provider',
            url: 'https://github.com/sm-react/react-theme-provider',
        });
        return (<div></div>);
    })
github storybookjs / storybook / packages / getstorybook / generators / METEOR / template / .stories / index.js View on Github external
import React from 'react';
import { storiesOf, action, linkTo } from '@kadira/storybook';
import Button from './Button';
import Welcome from './Welcome';

storiesOf('Welcome', module)
  .add('to Storybook', () =&gt; (
    
  ));

storiesOf('Button', module)
  .add('with text', () =&gt; (
    <button>Hello Button</button>
  ))
  .add('with some emoji', () =&gt; (
    <button>😀 😎 👍 💯</button>
  ));
github mongodb / stitch-examples / PlateSpace / Web / src / components / sub-header / sub-header.stories.js View on Github external
import React from 'react';
import { storiesOf, action, linkTo } from '@kadira/storybook';
import { Localization } from '../../localization';
import SubHeader from './sub-header';

storiesOf('Sub Header', module)
  .add('View on map', () =&gt;
    
  )
  .add('View on list', () =&gt;
    
  );
github regentmarkets-repo-archive / binary-charts-archived / .storybook / future.js View on Github external
duration_unit: 'm',
    contract_type: 'CALL',
    basis: 'stake',
};

const fakeTrade2 = {
    date_start: 1465873888 + 6000,
    date_expiry: 1465873888 + 100000,
    duration: 2,
    amount: 50,
    duration_unit: 'm',
    contract_type: 'CALL',
    basis: 'stake',
};

storiesOf('In future', module)
    .add('Start later simple', () =&gt;
        
    )
    .add('Start later much more data', () =&gt;
        
    )
    .add('Exit later much more data', () =&gt;
github entria / entria-components / storybook / stories / Tabs.story.js View on Github external
import React from 'react';
import { storiesOf } from '@kadira/storybook';

import { Tabs, Tab, RoutedTabs, ScrollableRoutedTabs } from '../../src';

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

stories.add('default', () =&gt;
  <div style="{styles.wrapper}">
    
      
        <div style="{styles.tabComponent}">Component 1</div>
      
      
        <div style="{styles.tabComponent}">Component 2</div>
      
      
        <div style="{styles.tabComponent}">Component 3</div>
      
    
  </div>
);
github mosen / micromdm-ui / src / js / components / stories / Header.js View on Github external
import React from 'react';
import {storiesOf, action} from '@kadira/storybook';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import Header from '../Header';

storiesOf('Header', module)
  .add('default', () =&gt; {
    'use strict';
    return <header>;
  });
</header>
github ffxsam / ffx-meteor-react-boilerplate / .stories / button.js View on Github external
import React from 'react';
import { storiesOf } from '@kadira/storybook';
import { styles } from './shared';

storiesOf('common.button', module)
  .addDecorator(story =&gt; (
    <div style="{styles.root}">
      {story()}
    </div>
  ))
  .add('normal', () =&gt; (
    <button type="button">Click</button>
  ));
github react-admin-lte / react-admin-lte / packages / react-admin-lte / src / Label / Label.stories.jsx View on Github external
import React from 'react';
import { storiesOf } from '@kadira/storybook';
import { Label } from '.';

storiesOf('Label', module)
  .addDecorator(story =&gt;
    <div style="{{">{story()}</div>
  )
  .add('default', () =&gt; (
    <label>old</label>
  ))
  .add('with background color', () =&gt; (
    <label background="green">new</label>
  ));
github zksailor534 / react-adminlte-dash / src / stories / NavbarLogo.js View on Github external
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { Logo } from '../index';

storiesOf('Logo', module)
  .add('default view', () =&gt; (
    
  ))
  .add('light blue', () =&gt; (
    
  ))
  .add('black', () =&gt; (
    
  ))
  .add('light black', () =&gt; (
    
  ))
  .add('green', () =&gt; (
    
  ))
  .add('light green', () =&gt; (
github neos / neos-ui / Resources / Private / JavaScript / Components / IconButton / index.story.js View on Github external
import React from 'react';
import {storiesOf, action} from '@kadira/storybook';
import IconButton from './index.js';

storiesOf('IconButton', module)
    .add('default', () =&gt; (
        <div>
            
        </div>
    ));