import {FC, MouseEvent as ReactMouseEvent} from "react"; import {__} from "../globals"; import {useHover} from "./hooks"; import classNames from "classnames"; import {EmulatedButton} from "./EmulatedButton"; export interface RemoveButtonProps { entityID: string, onClick: (event: ReactMouseEvent) => void, onRequestToHighlight?: () => void, onRequestToUnHighlight?: () => void, show?: boolean, positionX?: 'right-corner' | 'right' | 'right-inset', positionY?: 'top' | 'top-inset', showLabel?: boolean } export const RemoveButton: FC = ({onClick, entityID, onRequestToHighlight, onRequestToUnHighlight, show, positionX = 'right-corner', positionY = 'top', showLabel = true}) => { const ref = useHover({onMouseEnter: onRequestToHighlight, onMouseLeave: onRequestToUnHighlight}) return
{showLabel && {__('Remove')}}
}