fix: custom theme validation added (#3246)

This commit is contained in:
Anmol Singh Bhatia 2023-12-26 13:11:59 +05:30 committed by GitHub
parent 37d88cc05b
commit 542b18a585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,6 +60,7 @@ const calculateShades = (hexValue: string): TShades => {
};
export const applyTheme = (palette: string, isDarkPalette: boolean) => {
if (!palette) return;
const dom = document?.querySelector<HTMLElement>("[data-theme='custom']");
// palette: [bg, text, primary, sidebarBg, sidebarText]
const values: string[] = palette.split(",");