// react import React, { useState } from "react"; // react hook forms import { Control, Controller } from "react-hook-form"; // icons import { ChevronDownIcon, PlayIcon } from "lucide-react"; // hooks import useEstimateOption from "hooks/use-estimate-option"; // ui import { Icon, SecondaryButton } from "components/ui"; // components import { Label, StateSelect, PrioritySelect, AssigneeSelect, EstimateSelect, } from "components/web-view"; // types import type { IIssue } from "types"; type Props = { control: Control; submitChanges: (data: Partial) => Promise; }; export const IssuePropertiesDetail: React.FC = (props) => { const { control, submitChanges } = props; const [isViewAllOpen, setIsViewAllOpen] = useState(false); const { isEstimateActive } = useEstimateOption(); return (
State
( submitChanges({ state: val })} /> )} />
Priority
( submitChanges({ priority: val })} /> )} />
Assignee
( submitChanges({ assignees_list: [val] })} /> )} />
{isViewAllOpen && ( <> {isEstimateActive && (
Estimate
( submitChanges({ estimate_point: val })} /> )} />
)} )}
setIsViewAllOpen((prev) => !prev)} className="w-full flex justify-center items-center gap-1 !py-2" > {isViewAllOpen ? "View less" : "View all"}
); };