Skip to content

Commit

Permalink
Create @storybook/react/demo exports
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Jun 22, 2017
1 parent d1b625a commit f496deb
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 16 deletions.
3 changes: 1 addition & 2 deletions addons/storyshots/stories/directly_required/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React from 'react';

import { storiesOf } from '@storybook/react'; // eslint-disable-line
import { action } from '@storybook/addon-actions'; // eslint-disable-line

import Button from '@storybook/react/dist/demo/Button';
import { Button } from '@storybook/react/demo';

storiesOf('Another Button', module)
.add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React from 'react';

import { storiesOf } from '@storybook/react'; // eslint-disable-line
import { action } from '@storybook/addon-actions'; // eslint-disable-line

import Button from '@storybook/react/dist/demo/Button';
import { Button } from '@storybook/react/demo';

storiesOf('Button', module)
.add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';

import { storiesOf } from '@storybook/react'; // eslint-disable-line
import { linkTo } from '@storybook/addon-links'; // eslint-disable-line

import Welcome from '@storybook/react/dist/demo/Welcome';
import { Welcome } from '@storybook/react/demo';

storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />);
5 changes: 5 additions & 0 deletions app/react/demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* eslint-disable global-require */
module.exports = {
Welcome: require('./dist/demo/Welcome').default,
Button: require('./dist/demo/Button').default,
};
4 changes: 0 additions & 4 deletions app/react/src/demo/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/cra-kitchen-sink/src/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from '@storybook/addon-knobs';
import centered from '@storybook/addon-centered';

import { Button, Welcome } from '@storybook/react/dist/demo';
import { Button, Welcome } from '@storybook/react/demo';

import App from '../App';
import Logger from './Logger';
Expand Down
2 changes: 1 addition & 1 deletion examples/test-cra/src/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';

import { Button, Welcome } from '@storybook/react/dist/demo';
import { Button, Welcome } from '@storybook/react/demo';
import ComponentWithRef from './ComponentWithRef';

storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />);
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/generators/METEOR/template/.stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';

import { Button, Welcome } from '@storybook/react/dist/demo';
import { Button, Welcome } from '@storybook/react/demo';

storiesOf('Welcome', module)
.add('to Storybook', () => (
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/generators/REACT/template/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';

import { Button, Welcome } from '@storybook/react/dist/demo';
import { Button, Welcome } from '@storybook/react/demo';

storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';

import { Button, Welcome } from '@storybook/react/dist/demo';
import { Button, Welcome } from '@storybook/react/demo';

storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />);

Expand Down
2 changes: 1 addition & 1 deletion lib/cli/generators/WEBPACK_REACT/template/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';

import { Button, Welcome } from '@storybook/react/dist/demo';
import { Button, Welcome } from '@storybook/react/demo';

storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />);

Expand Down

0 comments on commit f496deb

Please sign in to comment.