d684e3c440
Add Neutral, Indigo, Forest, and Sand palettes independently of Light, Dark, and System. Persist and hydrate the selection, add the accessible settings picker, and include the validated review fixes for keyboard navigation and Swedish copy.
11 lines
385 B
TypeScript
11 lines
385 B
TypeScript
export const PALETTE_VALUES = ['neutral', 'indigo', 'forest', 'sand'] as const
|
|
|
|
export type Palette = (typeof PALETTE_VALUES)[number]
|
|
|
|
export const DEFAULT_PALETTE: Palette = 'neutral'
|
|
export const PALETTE_STORAGE_KEY = 'accounted-palette'
|
|
|
|
export function isPalette(value: unknown): value is Palette {
|
|
return typeof value === 'string' && PALETTE_VALUES.includes(value as Palette)
|
|
}
|