@@ -13,8 +13,8 @@ storiesOf('Select', module)
13
13
) )
14
14
. add ( 'Select' , ( ) => (
15
15
< div >
16
- < Select >
17
- < option selected > Choose your sweet</ option >
16
+ < Select defaultValue = "Marshmallow" >
17
+ < option > Choose your sweet</ option >
18
18
< option > Marshmallow</ option >
19
19
< option > Nougat</ option >
20
20
< option > Ice cream</ option >
@@ -24,20 +24,18 @@ storiesOf('Select', module)
24
24
) )
25
25
. add ( 'Select multiple' , ( ) => (
26
26
< div >
27
- < Select multiple >
27
+ < Select defaultValue = { [ 'Nougat' , 'Ice cream' ] } multiple >
28
28
< option > Marshmallow</ option >
29
- < option selected > Nougat</ option >
29
+ < option > Nougat</ option >
30
30
< option > Ice cream</ option >
31
- < option selected > Gingerbread</ option >
31
+ < option > Gingerbread</ option >
32
32
</ Select >
33
33
</ div >
34
34
) )
35
35
. add ( 'Disabled select' , ( ) => (
36
36
< div >
37
37
< Select disabled >
38
- < option selected disabled >
39
- Choose your sweet
40
- </ option >
38
+ < option disabled > Choose your sweet</ option >
41
39
< option > Marshmallow</ option >
42
40
< option > Nougat</ option >
43
41
< option > Ice cream</ option >
@@ -47,10 +45,8 @@ storiesOf('Select', module)
47
45
) )
48
46
. add ( 'Valid select' , ( ) => (
49
47
< div >
50
- < Select isValid >
51
- < option selected disabled >
52
- Choose your sweet
53
- </ option >
48
+ < Select defaultValue = "Choose your sweet" isValid >
49
+ < option disabled > Choose your sweet</ option >
54
50
< option > Marshmallow</ option >
55
51
< option > Nougat</ option >
56
52
< option > Ice cream</ option >
@@ -60,10 +56,12 @@ storiesOf('Select', module)
60
56
) )
61
57
. add ( 'Valid select with custom message' , ( ) => (
62
58
< div >
63
- < Select isValid validInputMessage = "This is a valid select input message" >
64
- < option selected disabled >
65
- Choose your sweet
66
- </ option >
59
+ < Select
60
+ defaultValue = "Choose your sweet"
61
+ isValid
62
+ validInputMessage = "This is a valid select input message"
63
+ >
64
+ < option disabled > Choose your sweet</ option >
67
65
< option > Marshmallow</ option >
68
66
< option > Nougat</ option >
69
67
< option > Ice cream</ option >
@@ -73,10 +71,8 @@ storiesOf('Select', module)
73
71
) )
74
72
. add ( 'Invalid select' , ( ) => (
75
73
< div >
76
- < Select isInvalid >
77
- < option selected disabled >
78
- Choose your sweet
79
- </ option >
74
+ < Select defaultValue = "Choose your sweet" isInvalid >
75
+ < option disabled > Choose your sweet</ option >
80
76
< option > Marshmallow</ option >
81
77
< option > Nougat</ option >
82
78
< option > Ice cream</ option >
@@ -86,10 +82,12 @@ storiesOf('Select', module)
86
82
) )
87
83
. add ( 'Invalid select with custom message' , ( ) => (
88
84
< div >
89
- < Select isInvalid invalidInputMessage = "This is an invalid select input error message" >
90
- < option selected disabled >
91
- Choose your sweet
92
- </ option >
85
+ < Select
86
+ defaultValue = "Choose your sweet"
87
+ isInvalid
88
+ invalidInputMessage = "This is an invalid select input error message"
89
+ >
90
+ < option disabled > Choose your sweet</ option >
93
91
< option > Marshmallow</ option >
94
92
< option > Nougat</ option >
95
93
< option > Ice cream</ option >
0 commit comments