import { useState } from "react"; import { UseFormReturn } from "react-hook-form"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Icon } from "@calcom/ui/Icon"; import { Dropdown, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, TextField, } from "@calcom/ui/v2"; import { getWorkflowTimeUnitOptions } from "../../lib/getOptions"; import type { FormValues } from "../../pages/v2/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) => ( ))}
); };