import { FC } from "react"; import { observer } from "mobx-react"; import { Info, MoveRight } from "lucide-react"; import { TEstimatePointsObject } from "@plane/types"; import { Tooltip } from "@plane/ui"; // helpers import { cn } from "@/helpers/common.helper"; // hooks import { useEstimatePoint } from "@/hooks/store"; type TEstimatePointItemSwitchPreview = { estimateId: string; estimatePointId: string | undefined; estimatePoint: TEstimatePointsObject; handleEstimatePoint: (value: string) => void; errorType?: string; isError?: boolean; }; export const EstimatePointItemSwitchPreview: FC = observer((props) => { const { estimateId, estimatePointId, estimatePoint: currentEstimatePoint, handleEstimatePoint, errorType = "", isError = false, } = props; // hooks const { asJson: estimatePoint } = useEstimatePoint(estimateId, estimatePointId); if (!estimatePoint) return <>; return (
{estimatePoint?.value}
handleEstimatePoint(e.target.value)} className="border-none focus:ring-0 focus:border-0 focus:outline-none p-2.5 w-full bg-transparent" autoFocus placeholder="Enter estimate point value" /> {isError && ( <>
)}
); });