(colorName: keyof typeof THEME_COLORS)
| 216 | }; |
| 217 | |
| 218 | export const varWithFallback = (colorName: keyof typeof THEME_COLORS) => { |
| 219 | const themeVals = THEME_COLORS[colorName]; |
| 220 | if (!themeVals) { |
| 221 | throw new Error(`Invalid theme color name ${colorName}`); |
| 222 | } |
| 223 | return getRecursiveVar(themeVals.vars, themeVals.default); |
| 224 | }; |
| 225 | |
| 226 | export const setDocumentStylesFromTheme = ( |
| 227 | theme: Record<string, string | undefined | null>, |
no test coverage detected