import { FC, ReactNode } from "react" import InteractionHandler from "../action/InteractionHandler" import classNames from "classnames" interface Props { tooltip: string className?: string onClick: () => void interaction: (touch: boolean) => void children?: ReactNode } const ControlButton: FC = ({ tooltip, className, onClick, interaction, children, }) => { return ( { e.preventDefault() e.stopPropagation() onClick() interaction(touch) }} onMove={(e, touch) => { e.preventDefault() e.stopPropagation() interaction(touch) }} prevent={true} > {children} ) } export default ControlButton