/** * Theme Debug Component * Shows current theme values for debugging */ import React, { useEffect, useState } from 'react'; import { useTheme } from '@/hooks/useTheme'; export function ThemeDebug() { const { theme, themeId } = useTheme(); const [cssVars, setCssVars] = useState>({}); const [isVisible, setIsVisible] = useState(true); useEffect(() => { const root = document.documentElement; const computedStyle = getComputedStyle(root); const vars: Record = { '--background': computedStyle.getPropertyValue('--background'), '--foreground': computedStyle.getPropertyValue('--foreground'), '--card': computedStyle.getPropertyValue('--card'), '--primary-500': computedStyle.getPropertyValue('--primary-500'), '--secondary-500': computedStyle.getPropertyValue('--secondary-500'), }; setCssVars(vars); }, [theme, themeId]); // Only show in development if (process.env.NODE_ENV !== 'development') { return null; } if (!isVisible) { return ( ); } return (

Theme Debug

Current Theme: {themeId}
Theme Name: {theme.name}

{Object.entries(cssVars).map(([key, value]) => (
{key}: {value || 'not set'}
))}

); }