vite-plugin-windicss-theme
v1.0.1
Published
Access your WindiCSS theme and colors objects from a vite app.
Downloads
1
Readme
vite-plugin-windicss-theme
Access your WindiCSS theme and colors objects from a vite app.
Usage
tsconfig.json
{
"include": ["src", "windi.config.ts", "vite.config.ts"]
}
vite.config.ts
import windiCSS from 'vite-plugin-windicss'
import windiThemePlugin from 'vite-plugin-windicss-theme'
import windiTheme from './windi.config'
export default {
plugins: [
windiCSS(),
windiThemePlugin({config: "./windi.config.ts"})
]
};
component.tsx
import {colors,theme} from 'virtual:windi-theme';
export const Root = () => (
<div>
{JSON.stringify(colors,null,2)}
<br/><br/><br/><br/>
{JSON.stringify(theme,null,2)}
</div>
);