Files
simple-react-app-kit/docs/src/sandboxes/appearance/theme-toggle/AccentPicker.tsx
T
2026-09-21 17:09:54 +08:00

25 lines
571 B
TypeScript

import {
ThemeColorPicker,
accentColorSwatches,
} from "@workspace/appearance/components/theme-color-picker"
import type { ThemeColorConfig } from "@workspace/appearance/theme"
export function AccentPicker({
config,
onConfigChange,
}: {
config: ThemeColorConfig
onConfigChange: (config: ThemeColorConfig) => void
}) {
return (
<ThemeColorPicker
title="Accent color"
swatches={accentColorSwatches}
value={config.accentColor}
onValueChange={(accentColor) =>
onConfigChange({ ...config, accentColor })
}
/>
)
}