diff --git a/apps/web/components/Embed.tsx b/apps/web/components/Embed.tsx index 38bec35fe0..b4df401e78 100644 --- a/apps/web/components/Embed.tsx +++ b/apps/web/components/Embed.tsx @@ -1163,7 +1163,7 @@ export const EmbedButton = ({ ...props }: EmbedButtonProps & React.ComponentPropsWithoutRef) => { const router = useRouter(); - className = classNames(className, "hidden lg:inline-flex"); + className = classNames("hidden lg:inline-flex", className); const openEmbedModal = () => { goto(router, { dialog: "embed", diff --git a/packages/lib/classNames.ts b/packages/lib/classNames.ts index fa17f266ab..f6b6874767 100644 --- a/packages/lib/classNames.ts +++ b/packages/lib/classNames.ts @@ -1,3 +1,5 @@ +import { twMerge } from "tailwind-merge"; + export default function classNames(...classes: unknown[]) { - return classes.filter(Boolean).join(" "); + return twMerge(classes.filter(Boolean).join(" ")); } diff --git a/packages/lib/package.json b/packages/lib/package.json index 6e2af2846f..fbe66029b1 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -22,6 +22,7 @@ "next-i18next": "^11.3.0", "react-hot-toast": "^2.3.0", "rrule": "^2.7.1", + "tailwind-merge": "^1.8.1", "tsdav": "2.0.3", "tslog": "^3.2.1", "uuid": "^8.3.2" diff --git a/packages/ui/components/avatar/AvatarGroup.tsx b/packages/ui/components/avatar/AvatarGroup.tsx index af5bacd673..b6bc736153 100644 --- a/packages/ui/components/avatar/AvatarGroup.tsx +++ b/packages/ui/components/avatar/AvatarGroup.tsx @@ -20,7 +20,7 @@ export const AvatarGroup = function AvatarGroup(props: AvatarGroupProps) { const truncateAfter = props.truncateAfter || 4; return ( -
    +
      {avatars.map((item, enumerator) => { if (item.image != null) { if (LENGTH > truncateAfter && enumerator === truncateAfter - 1) { diff --git a/packages/ui/components/divider/Divider.tsx b/packages/ui/components/divider/Divider.tsx index e9f39f5bb6..a14c191470 100644 --- a/packages/ui/components/divider/Divider.tsx +++ b/packages/ui/components/divider/Divider.tsx @@ -1,12 +1,12 @@ import { classNames } from "@calcom/lib"; export function Divider({ className, ...props }: JSX.IntrinsicElements["hr"]) { - className = classNames(className, "gray-200"); + className = classNames("gray-200", className); return
      ; } export function VerticalDivider({ className, ...props }: JSX.IntrinsicElements["svg"]) { - className = classNames(className, "mx-3"); + className = classNames("mx-3", className); return ( (function InputF