This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +62
-1
lines changed
Expand file tree Collapse file tree 5 files changed +62
-1
lines changed Original file line number Diff line number Diff line change 1+ import '@kadira/storybook/addons'
2+ import '@kadira/storybook-addon-knobs/register'
Original file line number Diff line number Diff line change 1+ // IMPORTANT
2+ // ---------
3+ // This is an auto generated file with React CDK.
4+ // Do not modify this file.
5+
6+ import { configure } from '@kadira/storybook'
7+
8+ function loadStories ( ) {
9+ require ( '../example/stories' )
10+ }
11+
12+ configure ( loadStories , module )
Original file line number Diff line number Diff line change 1+ // IMPORTANT
2+ // ---------
3+ // This is an auto generated file with React CDK.
4+ // Do not modify this file.
5+ // Use `.storybook/user/modify_webpack_config.js instead`.
6+
7+ const path = require ( 'path' )
8+
9+ const config = {
10+ module : {
11+ loaders : [
12+ {
13+ test : / \. c s s ? $ / ,
14+ loaders : [ 'style' , 'raw' ] ,
15+ include : path . resolve ( __dirname , '../' ) ,
16+ } ,
17+ ] ,
18+ } ,
19+ }
20+
21+ module . exports = config
Original file line number Diff line number Diff line change 1+ import React , { PropTypes } from 'react'
2+ import { storiesOf } from '@kadira/storybook'
3+ import { withKnobs } from '@kadira/storybook-addon-knobs'
4+ import { withSmartKnobs } from '../../src'
5+
6+ const Button = ( { children, onClick } ) => (
7+ < button onClick = { onClick } > { children } </ button >
8+ )
9+
10+ Button . propTypes = {
11+ onClick : PropTypes . func ,
12+ children : PropTypes . string ,
13+ }
14+
15+ storiesOf ( 'Example of Knobs' , module )
16+ . addDecorator ( withSmartKnobs )
17+ . addDecorator ( withKnobs )
18+ . add ( 'simple example' , ( ) => (
19+ < Button > My button</ Button >
20+ ) )
Original file line number Diff line number Diff line change 77 "test" : " jest" ,
88 "clean" : " rm -Rf ./dist" ,
99 "compile" : " babel ./src --out-dir ./dist" ,
10+ "storybook" : " start-storybook -p 9010" ,
1011 "prepublish" : " npm run clean && npm run compile"
1112 },
1213 "author" : " " ,
1617 "react" : " ^0.14.7 || ^15.0.0"
1718 },
1819 "devDependencies" : {
20+ "@kadira/storybook" : " ^2.25.0" ,
21+ "@kadira/storybook-addon-knobs" : " ^1.3.0" ,
1922 "babel-cli" : " ^6.16.0" ,
2023 "babel-preset-es2015" : " ^6.16.0" ,
2124 "babel-preset-react" : " ^6.16.0" ,
22- "babel-preset-stage-0" : " ^6.16.0"
25+ "babel-preset-stage-0" : " ^6.16.0" ,
26+ "eslint-config-taller" : " ^1.0.2" ,
27+ "react" : " ^0.14.7 || ^15.0.0" ,
28+ "react-dom" : " ^15.3.2"
2329 }
2430}
You can’t perform that action at this time.
0 commit comments