Files
Sahaj Jain 0a44d81089 feat: add sidebar color sync toggle to sync with base colors
Adds a "Sync" toggle button to the Sidebar color group header that syncs
all sidebar colors to their respective base counterparts (e.g. sidebar
background → background, sidebar-primary → primary). When enabled, base
color changes automatically propagate to sidebar colors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 04:10:39 +05:30

68 lines
1.3 KiB
TypeScript

import { FocusColorId } from "@/store/color-control-focus-store";
export type ControlSectionProps = {
title: string;
children: React.ReactNode;
expanded?: boolean;
className?: string;
headerAction?: React.ReactNode;
};
export type ColorPickerProps = {
/**
* The current color value.
*/
color: string;
/**
* Callback invoked whenever the color value changes.
*/
onChange: (color: string) => void;
/**
* Human-readable label for the control.
*/
label: string;
/**
* (Optional) Identifier that maps this color picker to a theme style key.
* When provided, it enables programmatic focusing via `focusColorControl()`.
*/
name?: FocusColorId;
};
export type SliderInputProps = {
value: number;
onChange: (value: number) => void;
min: number;
max: number;
step: number;
label: string;
unit?: string;
};
export type ToggleOptionProps<T> = {
value: T;
options: { label: string; value: T }[];
onChange: (value: T) => void;
label: string;
};
export type ReadOnlyColorDisplayProps = {
color: string;
label: string;
linkTo: string;
};
export type ColorFormat = "hex" | "rgb" | "hsl" | "oklch";
export type ValidTailwindShade =
| "50"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900"
| "950";