diff --git a/src/context/Theme.tsx b/src/context/Theme.tsx index bb496da0d7a339835a253839587e28a2cc0b5006..e37f0b6549e6ad7dcf2b3c36ad7979067056f45c 100644 --- a/src/context/Theme.tsx +++ b/src/context/Theme.tsx @@ -101,10 +101,12 @@ export const PRESETS: { [key: string]: Theme } = { }, }; +const keys = Object.keys(PRESETS.dark); const GlobalTheme = createGlobalStyle<{ theme: Theme }>` :root { ${(props) => (Object.keys(props.theme) as Variables[]).map((key) => { + if (!keys.includes(key)) return; return `--${key}: ${props.theme[key]};`; })} }