@@ -11,48 +11,56 @@ type Story = StoryObj<typeof ChooseOne>;
11
11
12
12
export const FirstIsTrue : Story = {
13
13
args : {
14
- children : (
15
- < >
16
- < Cond condition > The first one shows.</ Cond >
17
- < Cond condition = { false } > The second one does not show.</ Cond >
18
- < Cond > The default does not show.</ Cond >
19
- </ >
20
- ) ,
14
+ children : [
15
+ < Cond key = "1" condition >
16
+ The first one shows.
17
+ </ Cond > ,
18
+ < Cond key = "2" condition = { false } >
19
+ The second one does not show.
20
+ </ Cond > ,
21
+ < Cond key = "3" > The default does not show.</ Cond > ,
22
+ ] ,
21
23
} ,
22
24
} ;
23
25
24
26
export const SecondIsTrue : Story = {
25
27
args : {
26
- children : (
27
- < >
28
- < Cond condition = { false } > The first one does not show.</ Cond >
29
- < Cond condition > The second one shows.</ Cond >
30
- < Cond > The default does not show.</ Cond >
31
- </ >
32
- ) ,
28
+ children : [
29
+ < Cond key = "1" condition = { false } >
30
+ The first one does not show.
31
+ </ Cond > ,
32
+ < Cond key = "2" condition >
33
+ The second one shows.
34
+ </ Cond > ,
35
+ < Cond key = "3" > The default does not show.</ Cond > ,
36
+ ] ,
33
37
} ,
34
38
} ;
35
39
export const AllAreTrue : Story = {
36
40
args : {
37
- children : (
38
- < >
39
- < Cond condition > Only the first one shows.</ Cond >
40
- < Cond condition > The second one does not show.</ Cond >
41
- < Cond > The default does not show.</ Cond >
42
- </ >
43
- ) ,
41
+ children : [
42
+ < Cond key = "1" condition >
43
+ Only the first one shows.
44
+ </ Cond > ,
45
+ < Cond key = "2" condition >
46
+ The second one does not show.
47
+ </ Cond > ,
48
+ < Cond key = "3" > The default does not show.</ Cond > ,
49
+ ] ,
44
50
} ,
45
51
} ;
46
52
47
53
export const NoneAreTrue : Story = {
48
54
args : {
49
- children : (
50
- < >
51
- < Cond condition = { false } > The first one does not show.</ Cond >
52
- < Cond condition = { false } > The second one does not show.</ Cond >
53
- < Cond > The default shows.</ Cond >
54
- </ >
55
- ) ,
55
+ children : [
56
+ < Cond key = "1" condition = { false } >
57
+ The first one does not show.
58
+ </ Cond > ,
59
+ < Cond key = "2" condition = { false } >
60
+ The second one does not show.
61
+ </ Cond > ,
62
+ < Cond key = "3" > The default shows.</ Cond > ,
63
+ ] ,
56
64
} ,
57
65
} ;
58
66
0 commit comments