|
|
@@ -52,7 +52,9 @@ const PaletteSwitcher: FC<IPaletteSwitcherProps> = ({
|
|
|
activePalette
|
|
|
]);
|
|
|
|
|
|
- const variantsPre: ThemeSwitchVariants = variantsProps;
|
|
|
+ const variantsPre: Array<Omit<ThemeSwitchVariants[0], "backgroundColor"> & {
|
|
|
+ backgroundColor?: ThemeSwitchVariants[0]["backgroundColor"]
|
|
|
+ }> = variantsProps;
|
|
|
|
|
|
const isHaveNC = variantsProps.findIndex(iV => iV.paletteKey === "nibgat-community") !== -1;
|
|
|
const isHaveCC = variantsProps.findIndex(iV => iV.paletteKey === "caycore") !== -1;
|
|
|
@@ -60,7 +62,7 @@ const PaletteSwitcher: FC<IPaletteSwitcherProps> = ({
|
|
|
|
|
|
if(!isHaveN) {
|
|
|
variantsPre.unshift({
|
|
|
- backgroundColor: isWorkWithHighlightButton ? "transparent" : "subtle",
|
|
|
+ backgroundColor: isWorkWithHighlightButton ? undefined : "subtle",
|
|
|
borderColor: "transparent",
|
|
|
paletteKey: "nibgat",
|
|
|
iconColor: "moon",
|
|
|
@@ -76,7 +78,7 @@ const PaletteSwitcher: FC<IPaletteSwitcherProps> = ({
|
|
|
|
|
|
if(!isHaveNC) {
|
|
|
variantsPre.unshift({
|
|
|
- backgroundColor: isWorkWithHighlightButton ? "transparent" : "subtle",
|
|
|
+ backgroundColor: isWorkWithHighlightButton ? undefined : "subtle",
|
|
|
paletteKey: "nibgat-community",
|
|
|
borderColor: "transparent",
|
|
|
iconColor: "moon",
|
|
|
@@ -92,7 +94,7 @@ const PaletteSwitcher: FC<IPaletteSwitcherProps> = ({
|
|
|
|
|
|
if(!isHaveCC) {
|
|
|
variantsPre.unshift({
|
|
|
- backgroundColor: isWorkWithHighlightButton ? "transparent" : "subtle",
|
|
|
+ backgroundColor: isWorkWithHighlightButton ? undefined : "subtle",
|
|
|
borderColor: "transparent",
|
|
|
paletteKey: "caycore",
|
|
|
iconColor: "moon",
|