Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Commit

Permalink
load stories dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
zyhou committed Jun 4, 2018
1 parent 873adea commit a934c8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stories/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { configure } from '@storybook/react';

const req = require.context('./', true, /\.stories\.js$/);

function loadStories() {
require('../stories/tickSlider');
req.keys().forEach(filename => req(filename));
}

configure(loadStories, module);
File renamed without changes.

0 comments on commit a934c8f

Please sign in to comment.