From 176564f4ed97dc48c99b60658555547ea854187f Mon Sep 17 00:00:00 2001 From: Mehul Date: Fri, 17 Nov 2023 19:40:58 +0530 Subject: [PATCH] fix: logo lack of contrast (#12401) Co-authored-by: Peer Richelsen --- .../event-meta/AvailableEventLocations.tsx | 2 +- packages/lib/invertLogoOnDark.ts | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx b/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx index cc8b6e253e..0eca36957c 100644 --- a/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx +++ b/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx @@ -22,7 +22,7 @@ function RenderIcon({ return ( {`${eventLocationType.label} ); diff --git a/packages/lib/invertLogoOnDark.ts b/packages/lib/invertLogoOnDark.ts index 13aa216a95..657751b7a2 100644 --- a/packages/lib/invertLogoOnDark.ts +++ b/packages/lib/invertLogoOnDark.ts @@ -1,6 +1,15 @@ // we want to invert all logos that contain -dark in their name // we don't want to invert logos that are not coming from the app-store -export default function invertLogoOnDark(url?: string) { - return (url?.includes("-dark") || !url?.startsWith("/app-store")) && "dark:invert"; +export default function invertLogoOnDark( + url?: string, + // The background color of the logo's display location is opposite of the general theme of the application. + // Ex. General App theme is black but the logo's background color is white. + opposite?: boolean +) { + return url?.includes("-dark") || !url?.startsWith("/app-store") + ? opposite + ? "invert dark:invert-0" + : "dark:invert" + : ""; }