diff --git a/apps/web/components/team/TeamListItem.tsx b/apps/web/components/team/TeamListItem.tsx index a705abbf37..65cc1cec56 100644 --- a/apps/web/components/team/TeamListItem.tsx +++ b/apps/web/components/team/TeamListItem.tsx @@ -99,7 +99,7 @@ export default function TeamListItem(props: Props) { )} {!isInvitee && ( -
+
diff --git a/apps/web/components/ui/Dropdown.tsx b/apps/web/components/ui/Dropdown.tsx index 6abe0e3d68..4a1b4a82c9 100644 --- a/apps/web/components/ui/Dropdown.tsx +++ b/apps/web/components/ui/Dropdown.tsx @@ -25,8 +25,11 @@ export const DropdownMenuContent = forwardRef { return ( {children} diff --git a/apps/web/components/ui/TableActions.tsx b/apps/web/components/ui/TableActions.tsx index cf81ead593..de093aa003 100644 --- a/apps/web/components/ui/TableActions.tsx +++ b/apps/web/components/ui/TableActions.tsx @@ -1,11 +1,15 @@ -import { Menu, Transition } from "@headlessui/react"; import { DotsHorizontalIcon } from "@heroicons/react/solid"; -import React, { FC, Fragment } from "react"; +import React, { FC } from "react"; -import classNames from "@lib/classNames"; import { useLocale } from "@lib/hooks/useLocale"; import { SVGComponent } from "@lib/types/SVGComponent"; +import Dropdown, { + DropdownMenuTrigger, + DropdownMenuContent, + DropdownMenuItem, +} from "@components/ui/Dropdown"; + import Button from "./Button"; export type ActionType = { @@ -38,57 +42,28 @@ const TableActions: FC = ({ actions }) => { ))}
- - {({ open }) => ( - <> -
- - {t("open_options")} - -
- - - -
- {actions.map((action) => { - const Element = typeof action.onClick === "function" ? "span" : "a"; - return ( - - {({ active }) => ( - - - )} - - ); - })} -
-
-
- - )} -
+
+ + + + + + {actions.map((action) => ( + + + + ))} + + +
); }; diff --git a/apps/web/package.json b/apps/web/package.json index 16d25b6b6e..27ccabd1cd 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -34,7 +34,6 @@ "@calcom/tsconfig": "*", "@calcom/ui": "*", "@daily-co/daily-js": "^0.21.0", - "@headlessui/react": "^1.4.2", "@heroicons/react": "^1.0.5", "@hookform/error-message": "^2.0.0", "@hookform/resolvers": "^2.8.5", diff --git a/apps/web/pages/event-types/index.tsx b/apps/web/pages/event-types/index.tsx index 0b83952dbd..4ab84b12ca 100644 --- a/apps/web/pages/event-types/index.tsx +++ b/apps/web/pages/event-types/index.tsx @@ -1,5 +1,3 @@ -// TODO: replace headlessui with radix-ui -import { Menu, Transition } from "@headlessui/react"; import { ArrowDownIcon, ArrowUpIcon, @@ -15,6 +13,8 @@ import Head from "next/head"; import Link from "next/link"; import React, { Fragment, useEffect, useState } from "react"; +import { Button } from "@calcom/ui"; + import { QueryCell } from "@lib/QueryCell"; import classNames from "@lib/classNames"; import { useLocale } from "@lib/hooks/useLocale"; @@ -29,6 +29,11 @@ import { Alert } from "@components/ui/Alert"; import Avatar from "@components/ui/Avatar"; import AvatarGroup from "@components/ui/AvatarGroup"; import Badge from "@components/ui/Badge"; +import Dropdown, { + DropdownMenuTrigger, + DropdownMenuContent, + DropdownMenuItem, +} from "@components/ui/Dropdown"; import UserCalendarIllustration from "@components/ui/svg/UserCalendarIllustration"; type Profiles = inferQueryOutput<"viewer.eventTypes">["profiles"]; @@ -194,101 +199,60 @@ const EventTypeList = ({ readOnly, types, profile }: EventTypeListProps): JSX.El
- - {({ open }) => ( - <> -
- - {t("open_options")} - -
- - - -
- - {({ active }) => ( - - - )} - - - {({ active }) => ( - - )} - - {isNativeShare ? ( - - {({ active }) => ( - - )} - - ) : null} -
-
-
- - )} -
+ + + + + + + + + + + + + + + + {isNativeShare ? ( + + + + ) : null} + +
diff --git a/yarn.lock b/yarn.lock index 6bcb007bca..dd25b0b4b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -969,11 +969,6 @@ intl-messageformat "9.11.4" tslib "^2.1.0" -"@headlessui/react@^1.4.2": - version "1.4.3" - resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.4.3.tgz#f77c6bb5cb4a614a5d730fb880cab502d48abf37" - integrity sha512-n2IQkaaw0aAAlQS5MEXsM4uRK+w18CrM72EqnGRl/UBOQeQajad8oiKXR9Nk15jOzTFQjpxzrZMf1NxHidFBiw== - "@heroicons/react@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@heroicons/react/-/react-1.0.5.tgz#2fe4df9d33eb6ce6d5178a0f862e97b61c01e27d"