import { useState } from "react"; import { UseFormReturn } from "react-hook-form"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Dropdown, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Icon, TextField, } from "@calcom/ui"; import { getWorkflowTimeUnitOptions } from "../lib/getOptions"; import type { FormValues } from "../pages/workflow"; type Props = { form: UseFormReturn; }; export const TimeTimeUnitInput = (props: Props) => { const { form } = props; const { t } = useLocale(); const timeUnitOptions = getWorkflowTimeUnitOptions(t); const [timeUnit, setTimeUnit] = useState(form.getValues("timeUnit")); return (
{timeUnitOptions.map((option, index) => ( ))}
); };