mirror of
https://github.com/formbricks/formbricks.git
synced 2026-03-13 19:30:36 -05:00
* colors, login, UI, fonts * add poppins font * add _document with included favicon and smooth-scrolling * update favicon imports Co-authored-by: knugget <johannes@knugget.de>
55 lines
1.9 KiB
TypeScript
55 lines
1.9 KiB
TypeScript
import { Menu, Transition } from "@headlessui/react";
|
|
import { signOut } from "next-auth/react";
|
|
import { Fragment } from "react";
|
|
import { classNames } from "../../lib/utils";
|
|
|
|
export default function MenuProfile({}) {
|
|
return (
|
|
<Menu as="div" className="relative flex-shrink-0">
|
|
{({ open }) => (
|
|
<>
|
|
<div>
|
|
<Menu.Button className="flex text-sm bg-white rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-snoopred-500">
|
|
<span className="sr-only">Open user menu</span>
|
|
<img
|
|
className="w-8 h-8 rounded-full"
|
|
src="/img/avatar-placeholder.png"
|
|
alt=""
|
|
/>
|
|
</Menu.Button>
|
|
</div>
|
|
<Transition
|
|
show={open}
|
|
as={Fragment}
|
|
enter="transition ease-out duration-100"
|
|
enterFrom="transform opacity-0 scale-95"
|
|
enterTo="transform opacity-100 scale-100"
|
|
leave="transition ease-in duration-75"
|
|
leaveFrom="transform opacity-100 scale-100"
|
|
leaveTo="transform opacity-0 scale-95"
|
|
>
|
|
<Menu.Items
|
|
static
|
|
className="absolute right-0 w-48 py-1 mt-2 origin-top-right bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none"
|
|
>
|
|
<Menu.Item>
|
|
{({ active }) => (
|
|
<button
|
|
onClick={() => signOut()}
|
|
className={classNames(
|
|
active ? "bg-lightgray-100" : "",
|
|
"block px-4 py-2 text-sm text-darkgray-500 w-full text-left"
|
|
)}
|
|
>
|
|
Sign Out
|
|
</button>
|
|
)}
|
|
</Menu.Item>
|
|
</Menu.Items>
|
|
</Transition>
|
|
</>
|
|
)}
|
|
</Menu>
|
|
);
|
|
}
|