File tree Expand file tree Collapse file tree 5 files changed +241
-133
lines changed
Expand file tree Collapse file tree 5 files changed +241
-133
lines changed Original file line number Diff line number Diff line change 11import '@storybook/addon-options/register' ;
22import '@storybook/addon-actions/register' ;
3+ import '@storybook/addon-knobs/register' ;
Original file line number Diff line number Diff line change 11import { setOptions } from '@storybook/addon-options' ;
2- import { configure } from '@storybook/react' ;
2+ import { configure , addDecorator } from '@storybook/react' ;
3+ import { withKnobs } from '@storybook/addon-knobs' ;
4+
5+ addDecorator ( withKnobs ) ;
36
47setOptions ( {
58 name : 'WebView' ,
Original file line number Diff line number Diff line change 44 "start" : " start-storybook -p 9001 -c ./.storybook" ,
55 "release" : " yarn build && git checkout gh-pages && rm -rf ../storybook && mv dist ../storybook && git add -A && git commit -m \" Storybook deploy\" && git push origin gh-pages && git checkout -"
66 },
7- "dependencies" : {
8- "@storybook/addon-options" : " ^3.2.10" ,
9- "@storybook/react" : " ^3.1.9"
10- },
117 "devDependencies" : {
12- "@storybook/addon-actions" : " ^3.2.11"
8+ "@storybook/react" : " ^3.2.12" ,
9+ "@storybook/addon-options" : " ^3.2.12" ,
10+ "@storybook/addon-actions" : " ^3.2.12" ,
11+ "@storybook/addon-knobs" : " ^3.2.12"
1312 }
1413}
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import WebView from 'WebView' ;
33import { action } from '@storybook/addon-actions' ;
4+ import { text } from '@storybook/addon-knobs' ;
45
56export const basic = ( ) => < WebView source = { { uri : 'https://www.youtube.com/embed/dQw4w9WgXcQ' } } /> ;
67
78export const onMessage = ( ) => (
8- < WebView source = { { uri : require ( './onMessage.html' ) } } onMessage = { action ( ' onMessage') } />
9+ < WebView source = { { uri : require ( './onMessage.html' ) } } onMessage = { action ( text ( 'Text' , ' onMessage') ) } />
910) ;
You can’t perform that action at this time.
0 commit comments