diff --git a/components/Shell.tsx b/components/Shell.tsx index 8ab86ae475..8326a106f2 100644 --- a/components/Shell.tsx +++ b/components/Shell.tsx @@ -1,4 +1,3 @@ -import { Menu, Transition } from "@headlessui/react"; import { SelectorIcon } from "@heroicons/react/outline"; import { CalendarIcon, @@ -25,6 +24,12 @@ import { trpc } from "@lib/trpc"; import { HeadSeo } from "@components/seo/head-seo"; import Avatar from "@components/ui/Avatar"; +import Dropdown, { + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@components/ui/Dropdown"; import Logo from "./Logo"; @@ -66,12 +71,12 @@ export function ShellSubHeading(props: { return (
-

+

{props.title}

- {props.subtitle &&

{props.subtitle}

} + {props.subtitle &&

{props.subtitle}

}
- {props.actions &&
{props.actions}
} + {props.actions &&
{props.actions}
}
); } @@ -159,17 +164,17 @@ export default function Shell(props: { -
+
-
-
+
+
-
-
+
-
+
{/* show top navigation for md and smaller (tablet and phones) */} -
@@ -275,134 +278,97 @@ export default function Shell(props: { ); } -function UserDropdown({ small, bottom }: { small?: boolean; bottom?: boolean }) { +function UserDropdown({ small }: { small?: boolean }) { const query = useMeQuery(); const user = query.data; return ( - - {({ open }) => ( - <> -
- {user && ( - - - - - {!small && ( - - {user.name} - - /{user.username} - - - )} - - {!small && ( -
+ + + + + View public page + + + + + + + + + + + + + + Join our Slack + + + + + + signOut({ callbackUrl: "/auth/logout" })} + className="flex px-4 py-2 text-sm font-medium cursor-pointer hover:bg-gray-100 hover:text-gray-900"> + + + + + ) ); } diff --git a/ee/lib/intercom/HelpMenuItem.tsx b/ee/lib/intercom/HelpMenuItem.tsx index 053393a3b1..e84709db47 100644 --- a/ee/lib/intercom/HelpMenuItem.tsx +++ b/ee/lib/intercom/HelpMenuItem.tsx @@ -1,34 +1,30 @@ -import { Menu } from "@headlessui/react"; import { ChatAltIcon } from "@heroicons/react/solid"; import { useIntercom } from "react-use-intercom"; import classNames from "@lib/classNames"; +import { DropdownMenuItem } from "@components/ui/Dropdown"; + const HelpMenuItem = () => { const { boot, show } = useIntercom(); return ( - - {({ active }) => ( - - )} - + "text-neutral-400 group-hover:text-neutral-500", + "mr-2 flex-shrink-0 h-5 w-5" + )} + aria-hidden="true" + /> + Help + + ); };