chore: update deps

This commit is contained in:
Vben
2021-05-17 00:54:45 +08:00
parent c26dd03416
commit e4c3d0918a
4 changed files with 262 additions and 223 deletions

View File

@@ -6,7 +6,7 @@ export const darkMode = 'light';
type Fn = (...arg: any) => any;
type GenerateTheme = 'default' | 'dark'
type GenerateTheme = 'default' | 'dark';
export interface GenerateColorsParams {
mixLighten: Fn;
@@ -17,14 +17,14 @@ export interface GenerateColorsParams {
export function generateAntColors(color: string, theme: GenerateTheme = 'default') {
return generate(color, {
theme
theme,
});
}
export function getThemeColors(color?: string) {
const tc = color || primaryColor;
const lightColors = generateAntColors(tc);
const primary = colors[5];
const primary = lightColors[5];
const modeColors = generateAntColors(primary, 'dark');
return [...lightColors, ...modeColors];