mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
08e5c791c8
* add scrollbar on ptz presets dropdown
* use cn function for class names throughout
* Revert "add scrollbar on ptz presets dropdown"
This reverts commit 2cee93dc3e
.
38 lines
1023 B
TypeScript
38 lines
1023 B
TypeScript
import {
|
|
Tooltip,
|
|
TooltipContent,
|
|
TooltipTrigger,
|
|
} from "@/components/ui/tooltip";
|
|
import { cn } from "@/lib/utils";
|
|
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
|
import { isDesktop } from "react-device-detect";
|
|
import { VscAccount } from "react-icons/vsc";
|
|
|
|
type AccountSettingsProps = {
|
|
className?: string;
|
|
};
|
|
export default function AccountSettings({ className }: AccountSettingsProps) {
|
|
return (
|
|
<Tooltip>
|
|
<TooltipTrigger asChild>
|
|
<div
|
|
className={cn(
|
|
"flex flex-col justify-center items-center",
|
|
isDesktop
|
|
? "rounded-lg text-secondary-foreground bg-secondary hover:bg-muted cursor-pointer"
|
|
: "text-secondary-foreground",
|
|
className,
|
|
)}
|
|
>
|
|
<VscAccount className="size-5 md:m-[6px]" />
|
|
</div>
|
|
</TooltipTrigger>
|
|
<TooltipPortal>
|
|
<TooltipContent side="right">
|
|
<p>Account</p>
|
|
</TooltipContent>
|
|
</TooltipPortal>
|
|
</Tooltip>
|
|
);
|
|
}
|