diff --git a/ui/.storybook/config.js b/ui/.storybook/config.js index c00d9483..404a63a1 100644 --- a/ui/.storybook/config.js +++ b/ui/.storybook/config.js @@ -1,7 +1,10 @@ const { configure } = require('@kadira/storybook'); +const req = require.context('../src/components', true, /story.js$/) + function loadStories() { + req.keys().forEach((filename) => req(filename)); require('../stories'); } -configure(loadStories, module); +configure(loadStories, module); \ No newline at end of file diff --git a/ui/src/components/button/story.js b/ui/src/components/button/story.js new file mode 100644 index 00000000..08e4d381 --- /dev/null +++ b/ui/src/components/button/story.js @@ -0,0 +1,27 @@ +const React = require('react'); +const { + storiesOf +} = require('@kadira/storybook'); + +const Button = require('./'); + +storiesOf('Button', module) + .add('With text', () => ( + + )).add('Secondary', () => ( + + )).add('Disabled', () => ( + + )).add('Anchor', () => ( +
+ +
+ )); \ No newline at end of file diff --git a/ui/stories/index.js b/ui/stories/index.js index e9d1f274..31893971 100644 --- a/ui/stories/index.js +++ b/ui/stories/index.js @@ -7,7 +7,7 @@ const { const { Base, - Button, + // Button, Container, Checkbox, Row, @@ -178,26 +178,26 @@ storiesOf('Avatar', module) )); -storiesOf('Button', module) - .add('With text', () => ( - - )).add('Secondary', () => ( - - )).add('Disabled', () => ( - - )).add('Anchor', () => ( -
- -
- )); +// storiesOf('Button', module) +// .add('With text', () => ( +// +// )).add('Secondary', () => ( +// +// )).add('Disabled', () => ( +// +// )).add('Anchor', () => ( +//
+// +//
+// )); storiesOf('Checkbox', module) .add('Default', () => (