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

Status

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