This repository was archived by the owner on May 28, 2019. It is now read-only.
Description Hi,
I'm using React CDK for a collection of components, and I'd like to colocate the stories:
src
|-- components
|---|-- Button
|---|---|-- Button.js
|---|---|-- Button.test.js
|---|---|-- Button.stories.js
|---|-- Input
|---|---|-- Input.js
|---|---|-- Input.test.js
|---|---|-- Input.stories.js
In .storybook/config, I can simply update the loadStories function to do something like this:
const components = require . context ( '../src/components' , true , / .s t o r i e s .j s $ / ) ;
function loadStories ( ) {
components . keys ( ) . forEach ( filename => components ( filename ) ) ;
}
This works great, but there's a warning at the top of ./storybook/config:
// IMPORTANT
// ---------
// This is an auto generated file with React CDK.
// Do not modify this file.
I'm afraid that my changes will be overwritten, or at the very least, that there's a better way to do this. Please let me know :)
Reactions are currently unavailable
Hi,
I'm using React CDK for a collection of components, and I'd like to colocate the stories:
In
.storybook/config, I can simply update theloadStoriesfunction to do something like this:This works great, but there's a warning at the top of
./storybook/config:I'm afraid that my changes will be overwritten, or at the very least, that there's a better way to do this. Please let me know :)