aboutsummaryrefslogtreecommitdiffstats
path: root/uidev
diff options
context:
space:
mode:
authorLibravatar Amine El Mouafik <412895+kytwb@users.noreply.github.com>2021-02-08 10:34:45 +0100
committerLibravatar GitHub <noreply@github.com>2021-02-08 10:34:45 +0100
commit035002ceedf78d5ec73eabc0df7f06139939b967 (patch)
tree1c0d1e9531bae05fb65d70b9ea25baf404b74fe1 /uidev
parentdocs: add k0staa as a contributor (#1193) (diff)
downloadferdium-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')
-rw-r--r--uidev/src/app.tsx1
-rw-r--r--uidev/src/stories/textarea.stories.tsx43
2 files changed, 44 insertions, 0 deletions
diff --git a/uidev/src/app.tsx b/uidev/src/app.tsx
index cef22e7a7..593019c35 100644
--- a/uidev/src/app.tsx
+++ b/uidev/src/app.tsx
@@ -15,6 +15,7 @@ import './stories/infobox.stories';
15import './stories/input.stories'; 15import './stories/input.stories';
16import './stories/loader.stories'; 16import './stories/loader.stories';
17import './stories/select.stories'; 17import './stories/select.stories';
18import './stories/textarea.stories';
18import './stories/toggle.stories'; 19import './stories/toggle.stories';
19 20
20import { store } from './stores'; 21import { store } from './stores';
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 @@
1import React from 'react';
2import uuid from 'uuid/v4';
3
4import { Textarea } from '@meetfranz/forms';
5import { storiesOf } from '../stores/stories';
6
7const 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
18storiesOf('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 ));