2026-09-21 17:09:54 +08:00
|
|
|
import {
|
|
|
|
|
ThemeColorPicker,
|
|
|
|
|
accentColorSwatches,
|
2026-09-29 21:29:49 +08:00
|
|
|
type ThemeColorPickerVariant,
|
2026-09-21 17:09:54 +08:00
|
|
|
} from "@workspace/appearance/components/theme-color-picker"
|
|
|
|
|
import type { ThemeColorConfig } from "@workspace/appearance/theme"
|
|
|
|
|
|
|
|
|
|
export function AccentPicker({
|
|
|
|
|
config,
|
|
|
|
|
onConfigChange,
|
2026-09-29 21:29:49 +08:00
|
|
|
variant,
|
2026-09-21 17:09:54 +08:00
|
|
|
}: {
|
|
|
|
|
config: ThemeColorConfig
|
|
|
|
|
onConfigChange: (config: ThemeColorConfig) => void
|
2026-09-29 21:29:49 +08:00
|
|
|
variant?: ThemeColorPickerVariant
|
2026-09-21 17:09:54 +08:00
|
|
|
}) {
|
|
|
|
|
return (
|
|
|
|
|
<ThemeColorPicker
|
|
|
|
|
title="Accent color"
|
|
|
|
|
swatches={accentColorSwatches}
|
|
|
|
|
value={config.accentColor}
|
2026-09-29 21:29:49 +08:00
|
|
|
variant={variant}
|
2026-09-21 17:09:54 +08:00
|
|
|
onValueChange={(accentColor) =>
|
|
|
|
|
onConfigChange({ ...config, accentColor })
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
)
|
|
|
|
|
}
|