Skip to content

Commit b3114d6

Browse files
committed
Fix ChooseOne story
1 parent 2f55e6b commit b3114d6

File tree

1 file changed

+36
-28
lines changed

1 file changed

+36
-28
lines changed

site/src/components/Conditionals/ChooseOne.stories.tsx

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,56 @@ type Story = StoryObj<typeof ChooseOne>;
1111

1212
export const FirstIsTrue: Story = {
1313
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+
],
2123
},
2224
};
2325

2426
export const SecondIsTrue: Story = {
2527
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+
],
3337
},
3438
};
3539
export const AllAreTrue: Story = {
3640
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+
],
4450
},
4551
};
4652

4753
export const NoneAreTrue: Story = {
4854
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+
],
5664
},
5765
};
5866

0 commit comments

Comments
 (0)