import { useState } from "react"; import { usePopper } from "react-popper"; import { Popover } from "@headlessui/react"; // popper // helper import { getButtonStyling } from "@plane/ui"; type Props = { label: string; icon?: any; title: string | undefined; description: string | undefined; onClick?: () => void; disabled?: boolean; }; export const ComicBoxButton: React.FC = (props) => { const { label, icon, title, description, onClick, disabled = false } = props; const [isHovered, setIsHovered] = useState(false); const handleMouseEnter = () => { setIsHovered(true); }; const handleMouseLeave = () => { setIsHovered(false); }; const [referenceElement, setReferenceElement] = useState(null); const [popperElement, setPopperElement] = useState(); const { styles, attributes } = usePopper(referenceElement, popperElement, { placement: "right-end", modifiers: [ { name: "offset", options: { offset: [0, 10], }, }, ], }); return (
{icon} {label}
{isHovered && (

{title}

{description}

)} ); };