Skip to content

Commit a814db7

Browse files
committed
fix(ui): fallback to white button when whitelabeled without primary color
1 parent 84b8604 commit a814db7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/sim/app/(auth)/components/branded-button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const BrandedButton = forwardRef<HTMLButtonElement, BrandedButtonProps>(
3434
ref
3535
) => {
3636
const brand = useBrandConfig()
37-
const isWhitelabeled = brand.isWhitelabeled
37+
const hasCustomColor = brand.isWhitelabeled && Boolean(brand.theme?.primaryColor)
3838
const [isHovered, setIsHovered] = useState(false)
3939

4040
const handleMouseEnter = (e: React.MouseEvent<HTMLButtonElement>) => {
@@ -55,13 +55,13 @@ export const BrandedButton = forwardRef<HTMLButtonElement, BrandedButtonProps>(
5555
onMouseLeave={handleMouseLeave}
5656
className={cn(
5757
'group inline-flex h-[30px] items-center justify-center gap-[7px] rounded-[5px] border px-[9px] text-[13.5px] transition-colors disabled:cursor-not-allowed disabled:opacity-50',
58-
!isWhitelabeled &&
58+
!hasCustomColor &&
5959
'border-[#FFFFFF] bg-[#FFFFFF] text-black hover:border-[#E0E0E0] hover:bg-[#E0E0E0]',
6060
fullWidth && 'w-full',
6161
className
6262
)}
6363
style={
64-
isWhitelabeled
64+
hasCustomColor
6565
? {
6666
backgroundColor: isHovered
6767
? (brand.theme?.primaryHoverColor ?? brand.theme?.primaryColor)

0 commit comments

Comments
 (0)