import type { CSSProperties } from "react" import { getTheme, getThemeCssVariables, type ThemeColorConfig, type ThemeScheme, } from "../theme" import { cn } from "@workspace/ui/lib/utils" export interface ThemePreviewProps { className?: string config: ThemeColorConfig scheme: ThemeScheme } export function ThemePreview({ scheme, config, className }: ThemePreviewProps) { const themeVariables = getThemeCssVariables(scheme, config) const baseTheme = getTheme(config.baseColor) ?? getTheme("neutral")! const style = { ...Object.fromEntries( Object.entries(themeVariables).map(([key, value]) => [`--${key}`, value]) ), "--preview-base": baseTheme.cssVars[scheme].accent, } as CSSProperties return (