Skip to content

Commit 04df93f

Browse files
authored
Add story with multiple rows in ColorSwatchPicker (#6289)
1 parent 4a9eecb commit 04df93f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/@react-spectrum/color/stories/ColorSwatchPicker.stories.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,12 @@ export const Default = (args) => (
4444
<ColorSwatch color="#00f" />
4545
</ColorSwatchPicker>
4646
);
47+
48+
export const ManySwatches = (args) => (
49+
<ColorSwatchPicker {...args} maxWidth="size-3000">
50+
{Array.from(Array(24)).map(() => {
51+
let color = `#${Math.floor(Math.random() * 0xffffff).toString(16).padStart(6, '0')}`;
52+
return <ColorSwatch key={color} color={color} />;
53+
})}
54+
</ColorSwatchPicker>
55+
);

0 commit comments

Comments
 (0)