From 010917a05e70216e13902aa255ee247c3e1ffdfa Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 4 Jan 2019 12:16:14 +0100 Subject: move storybook to root + typescript TODO: fix modules --- stories/input.stories.tsx | 97 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 stories/input.stories.tsx (limited to 'stories') diff --git a/stories/input.stories.tsx b/stories/input.stories.tsx new file mode 100644 index 000000000..59accc99a --- /dev/null +++ b/stories/input.stories.tsx @@ -0,0 +1,97 @@ +import React from 'react'; + +import { storiesOf } from '@storybook/react'; +import { action } from '@storybook/addon-actions'; + +import { Input } from '../packages/forms/src'; + +console.log('stories'); + +const defaultProps = { + label: 'Label', + id: 'test1', + name: 'test1', + onChange: action('changed'), + focus: true, +}; + +const defaultPasswordProps = { + label: 'Password', + type: 'password', + id: 'test1', + name: 'test1', + onChange: action('changed'), + focus: true, +}; + +storiesOf('Input', module) + .add('Basic', () => ( + + )) + .add('Without Label', () => ( + + )) + .add('Disabled', () => ( + + )) + .add('With prefix', () => ( + + )) + .add('With suffix', () => ( + + )) + .add('With pre-/suffix', () => ( + + )) + .add('With error', () => ( + + )); + +storiesOf('Password', module) + // .addDecorator(withThemesProvider(themes)) + .add('Basic', () => ( + + )) + .add('Show password toggle', () => ( + + )) + .add('Score password', () => ( + + )) + .add('Score password with error', () => ( + + )); -- cgit v1.2.3-70-g09d2