diff --git a/apps/web/components/booking/TimeOptions.tsx b/apps/web/components/booking/TimeOptions.tsx index 14947b04..ca50d265 100644 --- a/apps/web/components/booking/TimeOptions.tsx +++ b/apps/web/components/booking/TimeOptions.tsx @@ -1,9 +1,8 @@ -// TODO: replace headlessui with radix-ui -import { Switch } from "@headlessui/react"; import { FC, useEffect, useState } from "react"; import TimezoneSelect, { ITimezoneOption } from "react-timezone-select"; -import classNames from "@lib/classNames"; +import Switch from "@calcom/ui/Switch"; + import { useLocale } from "@lib/hooks/useLocale"; import { is24h, timeZone } from "../../lib/clock"; @@ -36,34 +35,17 @@ const TimeOptions: FC = ({ onToggle24hClock, onSelectTimeZone }) => { return selectedTimeZone !== "" ? (
-
{t("time_options")}
-
- - - {t("am_pm")} - - - {t("use_setting")} - - - {t("24_h")} - - +
{t("time_options")}
+
+ +
& { label: string; @@ -37,7 +37,7 @@ export default function Switch(props: SwitchProps) { {label && ( + className="cursor-pointer align-text-top text-sm font-medium text-neutral-700 ltr:ml-3 rtl:mr-3 dark:text-white"> {label} )} diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx index 308d259b..ec9a5d06 100644 --- a/packages/ui/index.tsx +++ b/packages/ui/index.tsx @@ -1,3 +1,4 @@ import * as React from "react"; export * from "./Button"; +export * from "./Switch";