mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-10 05:59:35 +00:00
feat: theme color switch
This commit is contained in:
15
build/vite/plugin/theme.ts
Normal file
15
build/vite/plugin/theme.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { viteThemePlugin, mixLighten, mixDarken, tinycolor } from 'vite-plugin-theme';
|
||||
import { getThemeColors, generateColors } from '../../config/themeConfig';
|
||||
|
||||
export function configThemePlugin() {
|
||||
const colors = generateColors({
|
||||
mixDarken,
|
||||
mixLighten,
|
||||
tinycolor,
|
||||
});
|
||||
|
||||
const plugin = viteThemePlugin({
|
||||
colorVariables: [...getThemeColors(), ...colors],
|
||||
});
|
||||
return plugin;
|
||||
}
|
Reference in New Issue
Block a user