diff --git a/example/stories/Button.js b/example/stories/Button.js deleted file mode 100644 index 5f585e8354d..00000000000 --- a/example/stories/Button.js +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; - -const buttonStyles = { - border: '1px solid #eee', - borderRadius: 3, - backgroundColor: '#FFFFFF', - cursor: 'pointer', - fontSize: 15, - padding: '3px 10px', -}; - -const Button = ({ onClick, style, color, width, children, disabled }) => ( - -); - -Button.propTypes = { - children: React.PropTypes.string.isRequired, - onClick: React.PropTypes.func, - color: React.PropTypes.string, - width: React.PropTypes.number, - disabled: React.PropTypes.bool, - style: React.PropTypes.object, -}; - -export default Button; diff --git a/example/stories/index.js b/example/stories/index.js index 3d7506d00af..91180b1c189 100644 --- a/example/stories/index.js +++ b/example/stories/index.js @@ -1,7 +1,6 @@ import React from 'react'; -import moment from 'moment'; import { storiesOf } from '@kadira/storybook'; -import { action } from '@kadira/storybook-addon-actions'; +import moment from 'moment'; import { withKnobs, number, @@ -12,25 +11,38 @@ import { date } from '../../src'; -import Button from './Button'; - -const today = new Date(); - -storiesOf('Button', module) +storiesOf('Example of Knobs', module) .addDecorator(withKnobs) - .add('default view', () => ( - + .add('simple example', () => ( + )) - .add('Story without any knobs', () => ( - + .add('with all knobs', () => { + const name = text('Name', 'Tom Cary'); + const dob = date('DOB', new Date('1889 Jan 20')); + const bold = boolean('Bold', false); + const color = select('Color', { + red: 'Red', + green: 'Green', + black: 'Black' + }, 'black'); + + const customStyle = object('Style', { + fontFamily: 'Arial', + padding: 20, + }); + + const style = { + ...customStyle, + fontWeight: bold ? 800: 400, + color + }; + + return ( +