2024-04-01 17:31:31 +02:00
|
|
|
import {
|
|
|
|
Tooltip,
|
|
|
|
TooltipContent,
|
|
|
|
TooltipTrigger,
|
|
|
|
} from "@/components/ui/tooltip";
|
2024-05-07 16:00:25 +02:00
|
|
|
import { cn } from "@/lib/utils";
|
2024-05-06 19:18:28 +02:00
|
|
|
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
2024-04-16 22:55:24 +02:00
|
|
|
import { isDesktop } from "react-device-detect";
|
2024-04-01 17:31:31 +02:00
|
|
|
import { VscAccount } from "react-icons/vsc";
|
|
|
|
|
2024-04-29 17:59:27 +02:00
|
|
|
type AccountSettingsProps = {
|
|
|
|
className?: string;
|
|
|
|
};
|
|
|
|
export default function AccountSettings({ className }: AccountSettingsProps) {
|
2024-04-01 17:31:31 +02:00
|
|
|
return (
|
|
|
|
<Tooltip>
|
|
|
|
<TooltipTrigger asChild>
|
2024-04-16 22:55:24 +02:00
|
|
|
<div
|
2024-05-07 16:00:25 +02:00
|
|
|
className={cn(
|
2024-05-14 17:06:44 +02:00
|
|
|
"flex flex-col items-center justify-center",
|
2024-05-07 16:00:25 +02:00
|
|
|
isDesktop
|
2024-05-14 17:06:44 +02:00
|
|
|
? "cursor-pointer rounded-lg bg-secondary text-secondary-foreground hover:bg-muted"
|
2024-05-07 16:00:25 +02:00
|
|
|
: "text-secondary-foreground",
|
|
|
|
className,
|
|
|
|
)}
|
2024-04-16 22:55:24 +02:00
|
|
|
>
|
|
|
|
<VscAccount className="size-5 md:m-[6px]" />
|
|
|
|
</div>
|
2024-04-01 17:31:31 +02:00
|
|
|
</TooltipTrigger>
|
2024-05-06 19:18:28 +02:00
|
|
|
<TooltipPortal>
|
|
|
|
<TooltipContent side="right">
|
|
|
|
<p>Account</p>
|
|
|
|
</TooltipContent>
|
|
|
|
</TooltipPortal>
|
2024-04-01 17:31:31 +02:00
|
|
|
</Tooltip>
|
|
|
|
);
|
|
|
|
}
|