forked from Github/frigate
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:
@@ -1,3 +1,4 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
import { LogSeverity } from "@/types/log";
|
||||
import { ReactNode, useMemo, useRef } from "react";
|
||||
import { CSSTransition } from "react-transition-group";
|
||||
@@ -32,7 +33,10 @@ export default function Chip({
|
||||
>
|
||||
<div
|
||||
ref={nodeRef}
|
||||
className={`flex px-2 py-1.5 rounded-2xl items-center z-10 ${className}`}
|
||||
className={cn(
|
||||
"flex px-2 py-1.5 rounded-2xl items-center z-10",
|
||||
className,
|
||||
)}
|
||||
onClick={onClick}
|
||||
>
|
||||
{children}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { isSafari } from "react-device-detect";
|
||||
import { Skeleton } from "../ui/skeleton";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export default function ImageLoadingIndicator({
|
||||
className,
|
||||
@@ -13,8 +14,8 @@ export default function ImageLoadingIndicator({
|
||||
}
|
||||
|
||||
return isSafari ? (
|
||||
<div className={`bg-gray-300 pointer-events-none ${className ?? ""}`} />
|
||||
<div className={cn("bg-gray-300 pointer-events-none", className)} />
|
||||
) : (
|
||||
<Skeleton className={`pointer-events-none ${className ?? ""}`} />
|
||||
<Skeleton className={cn("pointer-events-none", className)} />
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
import { LuLoader2 } from "react-icons/lu";
|
||||
|
||||
export default function ActivityIndicator({ className = "w-full", size = 30 }) {
|
||||
return (
|
||||
<div
|
||||
className={`flex items-center justify-center ${className}`}
|
||||
className={cn("flex items-center justify-center", className)}
|
||||
aria-label="Loading…"
|
||||
>
|
||||
<LuLoader2 className="animate-spin" size={size} />
|
||||
|
||||
Reference in New Issue
Block a user