// src/stories/docs/theme-editor/inspector.tsx import { For, type JSX } from 'solid-js'; import { toHex, PURPOSE } from '../theme-tokens'; import type { Palette } from './theme-css'; const RADIUS_MAX = 1.4; // rem export function Inspector(props: { tokens: string[]; // ordered '--color-*' names values: Palette; // active-mode palette (drives swatch colors) radius: string; // e.g. '0.6rem' onColorChange: (token: string, hex: string) => void; onRadiusChange: (rem: string) => void; }) { const radiusRem = () => parseFloat(props.radius) || 0; const swatch: JSX.CSSProperties = { width: '1.75rem', height: '1.75rem', padding: '0', border: '1px solid var(--color-border)', 'border-radius': '6px', background: 'none', cursor: 'pointer', 'flex-shrink': '0', }; return (