"use client" import { cn } from "@/lib/utils" import { LABEL_MENU_COLOR_SWATCHES, } from "@/components/gmail/sidebar/sidebar-nav-constants" import { MAIL_SIDEBAR_COLOR_SWATCH_RING_CLASS, } from "@/lib/mail-chrome-classes" import { normalizeNavColorClass } from "@/lib/nav-color" export type NavColorPickerVariant = "menu" | "sheet" | "field" const SWATCH_SIZE: Record = { menu: "size-6", sheet: "size-8", field: "size-8", } export function NavColorPicker({ value, onChange, variant = "field", swatches = LABEL_MENU_COLOR_SWATCHES, className, "aria-label": ariaLabel = "Couleur", }: { value: string onChange: (swatch: string) => void variant?: NavColorPickerVariant swatches?: readonly string[] className?: string "aria-label"?: string }) { const active = normalizeNavColorClass(value) const swatchClass = SWATCH_SIZE[variant] return (
{swatches.map((sw) => (
) }