From 6fd34af6f614d212994a396600d4d60d592f361e Mon Sep 17 00:00:00 2001 From: Kushagra Mathur Date: Mon, 4 Sep 2023 15:25:16 +0530 Subject: [PATCH] fix: dark mode icons for Riverside and Sirius Video (#11107) Co-authored-by: Peer Richelsen --- apps/web/components/AppListCard.tsx | 9 ++++++++- apps/web/components/eventtype/EventSetupTab.tsx | 2 +- apps/web/components/ui/form/LocationSelect.tsx | 11 ++++++++--- .../components/event-meta/AvailableEventLocations.tsx | 6 +++--- yarn.lock | 2 +- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/apps/web/components/AppListCard.tsx b/apps/web/components/AppListCard.tsx index 604891a43b..b41cddd1be 100644 --- a/apps/web/components/AppListCard.tsx +++ b/apps/web/components/AppListCard.tsx @@ -4,6 +4,7 @@ import { useEffect, useRef, useState } from "react"; import { z } from "zod"; import type { CredentialOwner } from "@calcom/app-store/types"; +import classNames from "@calcom/lib/classNames"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useTypedQuery } from "@calcom/lib/hooks/useTypedQuery"; @@ -80,7 +81,13 @@ export default function AppListCard(props: AppListCardProps) { return (
- {logo ? {`${title} : null} + {logo ? ( + {`${title} + ) : null}

{title}

diff --git a/apps/web/components/eventtype/EventSetupTab.tsx b/apps/web/components/eventtype/EventSetupTab.tsx index 835adc8f80..2683fb764b 100644 --- a/apps/web/components/eventtype/EventSetupTab.tsx +++ b/apps/web/components/eventtype/EventSetupTab.tsx @@ -306,7 +306,7 @@ export const EventSetupTab = ( "h-4 w-4", // invert all the icons except app icons eventLocationType.iconUrl && - !eventLocationType.iconUrl.startsWith("/app-store") && + eventLocationType.iconUrl.includes("-dark") && "dark:invert" )} alt={`${eventLocationType.label} logo`} diff --git a/apps/web/components/ui/form/LocationSelect.tsx b/apps/web/components/ui/form/LocationSelect.tsx index 8954a71ebf..b53218b40d 100644 --- a/apps/web/components/ui/form/LocationSelect.tsx +++ b/apps/web/components/ui/form/LocationSelect.tsx @@ -4,7 +4,6 @@ import { components } from "react-select"; import type { EventLocationType } from "@calcom/app-store/locations"; import type { CredentialDataWithTeamName } from "@calcom/app-store/utils"; import { classNames } from "@calcom/lib"; -import cx from "@calcom/lib/classNames"; import { Select } from "@calcom/ui"; export type LocationOption = { @@ -28,7 +27,7 @@ const OptionWithIcon = ({ icon, label }: { icon?: string; label: string }) => { src={icon} alt="cover" // invert all the icons except app icons - className={cx("h-3.5 w-3.5", icon && !icon.startsWith("/app-store") && "dark:invert")} + className={classNames(icon.includes("-dark") && "dark:invert", "h-3.5 w-3.5")} /> )} {label} @@ -57,7 +56,13 @@ export default function LocationSelect(props: Props (
- {e.icon && app-icon} + {e.icon && ( + app-icon + )} {e.label}
)} diff --git a/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx b/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx index a3ee446b6d..ea558419e0 100644 --- a/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx +++ b/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx @@ -22,9 +22,9 @@ function RenderIcon({ {`${eventLocationType.label} diff --git a/yarn.lock b/yarn.lock index 104b9e1322..3d6d9fa713 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39535,4 +39535,4 @@ __metadata: resolution: "zwitch@npm:2.0.4" checksum: f22ec5fc2d5f02c423c93d35cdfa83573a3a3bd98c66b927c368ea4d0e7252a500df2a90a6b45522be536a96a73404393c958e945fdba95e6832c200791702b6 languageName: node - linkType: hard + linkType: hard \ No newline at end of file