setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
{
if (id && event.shiftKey) {
onToggle(id, event);
} else {
onClick();
}
}
: undefined
}
onDragStart={(event) => {
setIsHovered(false);
event.dataTransfer.setData(
MIME_TYPES.excalidrawlib,
JSON.stringify(elements),
);
}}
/>
{adder}
{id && elements && (isHovered || isMobile || selected) && (
onToggle(id, event)}
className="library-unit__checkbox"
/>
)}
);
};