144 | {(presets ?? DEFAULT_PRESETS).map((row, i) => (
145 |
146 | {row.map((swatch, i) => (
147 | onChange(swatch)}>
152 | {swatch === value && }
153 |
154 | ))}
155 |
156 | ))}
157 |
158 |
159 | );
160 | }
161 |
--------------------------------------------------------------------------------
/src/components/design/atoms/inputs/ComboBox.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { useArgs } from "@storybook/client-api";
3 | import { ComponentStory, ComponentMeta } from "@storybook/react";
4 | import { ChangeEvent } from "react";
5 |
6 | import { ComboBox } from "./ComboBox";
7 |
8 | export default {
9 | title: "Design System/Atoms/Inputs/Combo Box",
10 | component: ComboBox,
11 | argTypes: {
12 | value: { name: "Value", type: "string", defaultValue: "Element A" },
13 | },
14 | } as ComponentMeta