2.2.0 • Published 10 years ago
react-storybook-story v2.2.0
React Storybook Story
A component to add additional information with your react-storybook stories.

To get started, install the module as a devDependency
npm install -D react-storybook-storyWhen writing stories, wrap your component with the <Story /> component and use the info parameter to give additional info.
import {storiesOf} from '@kadira/storybook';
import Story from 'react-storybook-story';
import 'react-storybook-story/styles.css';
storiesOf('<MyComponent />', module)
.add('my-example-story', function () {
const info = `
This story will render **MyComponent** with the
_foo_ parameter set to "bar"
`;
return (
<Story info={info}>
<MyComponent foo={'bar'} />
</Story>
);
});The FAQ
Error loading styles.css file
To load the stylesheet make sure your webpack config has style-loader and raw-loader setup properly. Modify your .storybook/webpack.config.js file to include the style-loader.
const path = require('path');
module.exports = {
module: {
loaders: [
{
test: /\.css?$/,
loaders: ['style', 'raw'],
include: path.resolve(__dirname, '../'),
},
],
},
};Credits
- markdown styles are based on markdowncss/modest
2.2.0
10 years ago
2.1.1
10 years ago
2.1.0
10 years ago
2.0.2
10 years ago
2.0.1
10 years ago
2.0.0
10 years ago
1.4.0
10 years ago
1.3.2
10 years ago
1.3.1
10 years ago
1.3.0
10 years ago
1.2.2
10 years ago
1.2.1
10 years ago
1.2.0
10 years ago
1.1.2
10 years ago
1.1.1
10 years ago
1.1.0
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago