// react import React from "react"; // react-hook-form import { Control, Controller, UseFormWatch } from "react-hook-form"; // ui import { CustomSelect } from "ui"; // icons import { Squares2X2Icon } from "@heroicons/react/24/outline"; // types import { IModule } from "types"; // common import { classNames } from "constants/common"; // constants import { MODULE_STATUS } from "constants/"; type Props = { control: Control, any>; submitChanges: (formData: Partial) => void; watch: UseFormWatch>; }; const SelectStatus: React.FC = ({ control, submitChanges, watch }) => { return (

Status

( option.value === value) ?.color, }} > {watch("status")} } value={value} onChange={(value: any) => { submitChanges({ status: value }); }} > {MODULE_STATUS.map((option) => ( <> {option.label} ))} )} />
); }; export default SelectStatus;