import React, { useRef, useState } from "react"; //hook import useOutsideClickDetector from "hooks/use-outside-click-detector"; // ui import { CustomMenu } from "@plane/ui"; // types import { IIssueLabels } from "types"; //icons import { Component, X, Pencil } from "lucide-react"; type Props = { label: IIssueLabels; addLabelToGroup: (parentLabel: IIssueLabels) => void; editLabel: (label: IIssueLabels) => void; handleLabelDelete: () => void; }; export const ProjectSettingLabelItem: React.FC = (props) => { const { label, addLabelToGroup, editLabel, handleLabelDelete } = props; const [isMenuActive, setIsMenuActive] = useState(false); const actionSectionRef = useRef(null); useOutsideClickDetector(actionSectionRef, () => setIsMenuActive(false)); return (
{label.name}
setIsMenuActive(!isMenuActive)}>
} > addLabelToGroup(label)}> Convert to group editLabel(label)}> Edit label
); };