Skip to content

Commit

Permalink
Merge pull request #2143 from storybooks/dd/cra-reorg
Browse files Browse the repository at this point in the history
CRA Example Cleanup - Info
  • Loading branch information
danielduan authored Oct 29, 2017
2 parents c6a6308 + 859d669 commit ec07bb0
Show file tree
Hide file tree
Showing 11 changed files with 3,631 additions and 37 deletions.
10 changes: 8 additions & 2 deletions examples/cra-kitchen-sink/.storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { configure, setAddon } from '@storybook/react';
import { setOptions } from '@storybook/addon-options';

// deprecated usage of infoAddon
import infoAddon from '@storybook/addon-info';

setOptions({
Expand All @@ -14,11 +16,15 @@ setOptions({
hierarchySeparator: /\/|\./,
});

// deprecated usage of infoAddon
setAddon(infoAddon);

// put welcome screen at the top of the list so it's the first one displayed
require('../src/stories/welcome');

const req = require.context('../src/stories', true, /\.stories\.js$/)
function loadStories() {
require('../src/stories/index');
require('../src/stories/storybook-components');
req.keys().forEach((filename) => req(filename))
}

configure(loadStories, module);
Loading

0 comments on commit ec07bb0

Please sign in to comment.