import React from 'react'; import { Surface, cn, surfaceClasses, useEffectiveSurface, } from '../common'; /* ───────────────────────────────────────────────────────────────────────── PixelColorSwatch — design token preview with CSS var label. ───────────────────────────────────────────────────────────────────────── */ export interface PixelColorSwatchProps { /** Display name for the token (e.g. "Cyan 500"). */ name: string; /** CSS variable to preview (e.g. "--retro-cyan"). */ cssVar: string; /** Visual surface override. */ surface?: Surface; } export function PixelColorSwatch({ name, cssVar, surface: surfaceProp, }: PixelColorSwatchProps) { const surface = useEffectiveSurface(surfaceProp); const s = surfaceClasses(surface); return (

{name}

{cssVar}

); }