From 2c514e58eabd71af280b727514dccb7c8db4e6cf Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Wed, 9 Jan 2019 11:05:32 +0100 Subject: Finalize packages & replace storybook with homegrown `uidev` --- uidev/src/stories/input.tsx | 92 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 uidev/src/stories/input.tsx (limited to 'uidev/src/stories') diff --git a/uidev/src/stories/input.tsx b/uidev/src/stories/input.tsx new file mode 100644 index 000000000..dc8f6e997 --- /dev/null +++ b/uidev/src/stories/input.tsx @@ -0,0 +1,92 @@ +import React from 'react'; + +import { Input } from '@meetfranz/forms'; +import { storiesOf } from '../stores/stories'; + +export const stories = () => (
input stories
); + +const defaultProps = { + label: 'Label', + id: 'test1', + name: 'test1', + onChange: (e: React.ChangeEvent) => console.log('changed event', e), +}; + +const defaultPasswordProps = { + label: 'Password', + type: 'password', + id: 'test1', + name: 'test1', + onChange: (e: React.ChangeEvent) => console.log('changed event', e), +}; + +storiesOf('Input') + .add('Basic', () => ( + + )) + .add('Without Label', () => ( + + )) + .add('Disabled', () => ( + + )) + .add('With prefix', () => ( + + )) + .add('With suffix', () => ( + + )) + .add('With pre-suffix', () => ( + + )) + .add('With error', () => ( + + )); + +storiesOf('Password') + .add('Basic', () => ( + + )) + .add('Show password toggle', () => ( + + )) + .add('Score password', () => ( + + )) + .add('Score password with error', () => ( + + )); -- cgit v1.2.3-54-g00ecf