aboutsummaryrefslogtreecommitdiffstats
path: root/uidev/src/stories/textarea.stories.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'uidev/src/stories/textarea.stories.tsx')
-rw-r--r--uidev/src/stories/textarea.stories.tsx43
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 @@
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 ));