summaryrefslogtreecommitdiffstats
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.tsx25
1 files changed, 19 insertions, 6 deletions
diff --git a/uidev/src/stories/textarea.stories.tsx b/uidev/src/stories/textarea.stories.tsx
index 09b9fef70..1ab21820b 100644
--- a/uidev/src/stories/textarea.stories.tsx
+++ b/uidev/src/stories/textarea.stories.tsx
@@ -1,5 +1,5 @@
1import React from 'react'; 1import React from 'react';
2import { v4 as uuid } from 'uuid'; 2import uuid from 'uuid/v4';
3 3
4import { Textarea } from '@meetfranz/forms'; 4import { Textarea } from '@meetfranz/forms';
5import { storiesOf } from '../stores/stories'; 5import { storiesOf } from '../stores/stories';
@@ -11,8 +11,7 @@ const defaultProps = () => {
11 id: `test-${id}`, 11 id: `test-${id}`,
12 name: `test-${id}`, 12 name: `test-${id}`,
13 rows: 5, 13 rows: 5,
14 onChange: (e: React.ChangeEvent<HTMLInputElement>) => 14 onChange: (e: React.ChangeEvent<HTMLInputElement>) => console.log('changed event', e),
15 console.log('changed event', e),
16 }; 15 };
17}; 16};
18 17
@@ -23,8 +22,22 @@ storiesOf('Textarea')
23 // placeholder="Placeholder text" 22 // placeholder="Placeholder text"
24 /> 23 />
25 )) 24 ))
26 .add('10 rows', () => <Textarea {...defaultProps()} rows={10} />) 25 .add('10 rows', () => (
26 <Textarea
27 {...defaultProps()}
28 rows={10}
29 />
30 ))
27 .add('With error', () => ( 31 .add('With error', () => (
28 <Textarea {...defaultProps()} error="This is a generic error message." /> 32 <Textarea
33 {...defaultProps()}
34 error="This is a generic error message."
35 />
29 )) 36 ))
30 .add('Disabled', () => <Textarea {...defaultProps()} rows={2} disabled />); 37 .add('Disabled', () => (
38 <Textarea
39 {...defaultProps()}
40 rows={2}
41 disabled
42 />
43 ));