exportThemeToCSS()
function exportThemeToCSS(theme): string
Exports the theme to CSS Variables on the root element
Parameters
Parameter | Type | Description |
---|---|---|
theme | ColorTheme | The theme to export |
Returns
string
The CSS code for the theme
Example
const theme = generateTheme({ baseColor: '#ff0000', expandPalette: true });
exportThemeToCSS(theme);
// returns ':root { --color-primary-500: #ff0000; }'