Use cn() for class names throughout (#11278)

* add scrollbar on ptz presets dropdown

* use cn function for class names throughout

* Revert "add scrollbar on ptz presets dropdown"

This reverts commit 2cee93dc3e.
This commit is contained in:
Josh Hawkins
2024-05-07 09:00:25 -05:00
committed by GitHub
parent a0da5018bf
commit 08e5c791c8
18 changed files with 94 additions and 26 deletions

View File

@@ -5,6 +5,7 @@ import {
TooltipTrigger,
} from "@/components/ui/tooltip";
import { isDesktop } from "react-device-detect";
import { cn } from "@/lib/utils";
const variants = {
primary: {
@@ -38,9 +39,11 @@ export default function CameraFeatureToggle({
const content = (
<div
onClick={onClick}
className={`${className} flex flex-col justify-center items-center ${
variants[variant][isActive ? "active" : "inactive"]
}`}
className={cn(
className,
"flex flex-col justify-center items-center",
variants[variant][isActive ? "active" : "inactive"],
)}
>
<Icon
className={`size-5 md:m-[6px] ${isActive ? "text-white" : "text-secondary-foreground"}`}