@@ -6,13 +6,6 @@ export default {
6
6
id : 'uui-textarea' ,
7
7
title : 'Inputs/Textarea' ,
8
8
component : 'uui-textarea' ,
9
- parameters : {
10
- docs : {
11
- source : {
12
- code : `<uui-textarea></uui-textarea>` ,
13
- } ,
14
- } ,
15
- } ,
16
9
args : {
17
10
value : '' ,
18
11
} ,
@@ -35,37 +28,120 @@ export const AAAOverview: Story = props =>
35
28
AAAOverview . storyName = 'Overview' ;
36
29
AAAOverview . args = {
37
30
label : 'Label' ,
38
- autoHeight : true ,
39
31
maxLength : 200 ,
40
32
minHeight : '100px' ,
41
33
maxHeight : '200px' ,
42
34
} ;
35
+ AAAOverview . parameters = {
36
+ docs : {
37
+ source : {
38
+ code : `<uui-textarea label="Label"></uui-textarea>` ,
39
+ } ,
40
+ } ,
41
+ } ;
43
42
44
43
export const MaxLength : Story = props =>
45
- html `< uui-textarea label ="textarea " maxLength ="20 "> </ uui-textarea > ` ;
44
+ html `< uui-textarea
45
+ label ="textarea "
46
+ maxLength =${ props . maxLength } > </ uui-textarea > ` ;
47
+
48
+ MaxLength . args = { maxLength : 20 } ;
49
+ MaxLength . parameters = {
50
+ controls : { include : [ 'maxLength' ] } ,
51
+ docs : {
52
+ source : {
53
+ code : `<uui-textarea label="textarea" maxLength="20"></uui-textarea>` ,
54
+ } ,
55
+ } ,
56
+ } ;
46
57
47
58
export const Disabled : Story = props =>
48
- html `< uui-textarea label ="textarea " disabled > </ uui-textarea > ` ;
59
+ html `< uui-textarea label ="Label " ?disabled =${ props . disabled } > </ uui-textarea > ` ;
60
+
61
+ Disabled . args = { disabled : true } ;
62
+ Disabled . parameters = {
63
+ controls : { include : [ 'disabled' ] } ,
64
+ docs : {
65
+ source : {
66
+ code : `<uui-textarea label="Label" disabled></uui-textarea>` ,
67
+ } ,
68
+ } ,
69
+ } ;
49
70
50
71
export const Placeholder : Story = props =>
51
72
html `< uui-textarea
52
- label ="textarea "
53
- placeholder ="I am a placeholder... "> </ uui-textarea > ` ;
73
+ label ="Label "
74
+ placeholder =${ props . placeholder } > </ uui-textarea > ` ;
75
+
76
+ Placeholder . args = { placeholder : 'I am a placeholder...' } ;
77
+ Placeholder . parameters = {
78
+ controls : { include : [ 'placeholder' ] } ,
79
+ docs : {
80
+ source : {
81
+ code : `<uui-textarea
82
+ label="Label"
83
+ placeholder="I am a placeholder..."></uui-textarea>` ,
84
+ } ,
85
+ } ,
86
+ } ;
54
87
55
88
export const MaxAndMinHeight : Story = props =>
56
89
html `< uui-textarea
57
- label ="textarea "
58
- minHeight ="100px "
59
- maxHeight ="200px "> </ uui-textarea > ` ;
90
+ label ="Label "
91
+ minHeight =${ props . minHeight }
92
+ maxHeight =${ props . maxHeight } > </ uui-textarea > ` ;
93
+
94
+ MaxAndMinHeight . args = { minHeight : '100px' , maxHeight : '200px' } ;
95
+ MaxAndMinHeight . parameters = {
96
+ controls : { include : [ 'minHeight' , 'maxHeight' ] } ,
97
+ docs : {
98
+ source : {
99
+ code : `<uui-textarea
100
+ label="Label"
101
+ minHeight="100px"
102
+ maxHeight="200px"></uui-textarea>` ,
103
+ } ,
104
+ } ,
105
+ } ;
60
106
61
107
export const AutomaticHeightAdjustment : Story = props =>
62
108
html ` the height wil confine itself within the max and min height if defined.
63
- < uui-textarea label ="textarea " auto-height > </ uui-textarea > ` ;
109
+ < uui-textarea
110
+ label ="Label "
111
+ ?auto-height =${ props . autoHeight } > </ uui-textarea > ` ;
112
+
113
+ AutomaticHeightAdjustment . args = { autoHeight : true } ;
114
+ AutomaticHeightAdjustment . parameters = {
115
+ controls : { include : [ 'autoHeight' ] } ,
116
+ docs : {
117
+ source : {
118
+ code : `<uui-textarea label="Label" auto-height></uui-textarea>` ,
119
+ } ,
120
+ } ,
121
+ } ;
64
122
65
123
export const AutomaticHeightAdjustmentWithHeightLimits : Story = props =>
66
124
html ` the height wil confine itself within the max and min height if defined.
67
125
< uui-textarea
68
- label ="textarea "
126
+ label ="Label "
69
127
auto-height
70
128
minHeight ="100px "
71
129
maxHeight ="200px "> </ uui-textarea > ` ;
130
+
131
+ AutomaticHeightAdjustmentWithHeightLimits . args = {
132
+ minHeight : '100px' ,
133
+ maxHeight : '200px' ,
134
+ autoHeight : true ,
135
+ } ;
136
+ AutomaticHeightAdjustmentWithHeightLimits . parameters = {
137
+ controls : { include : [ 'minHeight' , 'maxHeight' , 'autoHeight' ] } ,
138
+ docs : {
139
+ source : {
140
+ code : `<uui-textarea
141
+ label="Label"
142
+ auto-height
143
+ minHeight="100px"
144
+ maxHeight="200px"></uui-textarea>` ,
145
+ } ,
146
+ } ,
147
+ } ;
0 commit comments