diff --git a/src/renderer/components/shared/bsm-button.component.tsx b/src/renderer/components/shared/bsm-button.component.tsx index 539984a3..c71278ea 100644 --- a/src/renderer/components/shared/bsm-button.component.tsx +++ b/src/renderer/components/shared/bsm-button.component.tsx @@ -31,9 +31,12 @@ export function BsmButton({className, style, imgClassName, iconClassName, icon, const t = useTranslation(); const secondColor = useThemeColor("second-color"); - const primaryColor = typeColor === "primary" ? useThemeColor("first-color") : null; + const primaryColor = typeColor === "primary" && useThemeColor("first-color"); - const textColor = !primaryColor ? null : getCorrectTextColor(primaryColor); + const textColor = (() => { + if(primaryColor){ return getCorrectTextColor(primaryColor); } + return typeColor ? "white" : undefined; + })(); const renderTypeColor = (() => { if(typeColor === "primary"){ return ""; } @@ -49,7 +52,7 @@ export function BsmButton({className, style, imgClassName, iconClassName, icon,