diff options
author | 2021-02-08 10:34:45 +0100 | |
---|---|---|
committer | 2021-02-08 10:34:45 +0100 | |
commit | 035002ceedf78d5ec73eabc0df7f06139939b967 (patch) | |
tree | 1c0d1e9531bae05fb65d70b9ea25baf404b74fe1 /uidev/src/stories/textarea.stories.tsx | |
parent | docs: add k0staa as a contributor (#1193) (diff) | |
download | ferdium-app-035002ceedf78d5ec73eabc0df7f06139939b967.tar.gz ferdium-app-035002ceedf78d5ec73eabc0df7f06139939b967.tar.zst ferdium-app-035002ceedf78d5ec73eabc0df7f06139939b967.zip |
Synchronize with Franz 5.6.0 (#1033)
Co-authored-by: FranzBot <i18n@meetfranz.com>
Co-authored-by: vantezzen <hello@vantezzen.io>
Co-authored-by: Makazzz <makazzzpro@live.ca>
Co-authored-by: Stefan Malzner <stefan@adlk.io>
Co-authored-by: Amine Mouafik <amine@mouafik.fr>
Diffstat (limited to 'uidev/src/stories/textarea.stories.tsx')
-rw-r--r-- | uidev/src/stories/textarea.stories.tsx | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/uidev/src/stories/textarea.stories.tsx b/uidev/src/stories/textarea.stories.tsx new file mode 100644 index 000000000..c2dd74e24 --- /dev/null +++ b/uidev/src/stories/textarea.stories.tsx | |||
@@ -0,0 +1,43 @@ | |||
1 | import React from 'react'; | ||
2 | import uuid from 'uuid/v4'; | ||
3 | |||
4 | import { Textarea } from '@meetfranz/forms'; | ||
5 | import { storiesOf } from '../stores/stories'; | ||
6 | |||
7 | const defaultProps = () => { | ||
8 | const id = uuid(); | ||
9 | return { | ||
10 | label: 'Label', | ||
11 | id: `test-${id}`, | ||
12 | name: `test-${id}`, | ||
13 | rows: 5, | ||
14 | onChange: (e: React.ChangeEvent<HTMLInputElement>) => console.log('changed event', e), | ||
15 | }; | ||
16 | }; | ||
17 | |||
18 | storiesOf('Textarea') | ||
19 | .add('Basic', () => ( | ||
20 | <Textarea | ||
21 | {...defaultProps()} | ||
22 | // placeholder="Placeholder text" | ||
23 | /> | ||
24 | )) | ||
25 | .add('10 rows', () => ( | ||
26 | <Textarea | ||
27 | {...defaultProps()} | ||
28 | rows={10} | ||
29 | /> | ||
30 | )) | ||
31 | .add('With error', () => ( | ||
32 | <Textarea | ||
33 | {...defaultProps()} | ||
34 | error="This is a generic error message." | ||
35 | /> | ||
36 | )) | ||
37 | .add('Disabled', () => ( | ||
38 | <Textarea | ||
39 | {...defaultProps()} | ||
40 | rows={2} | ||
41 | disabled | ||
42 | /> | ||
43 | )); | ||