import React, { useState } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import './tooltip.css'; const arrowPositionStyle = { bottom: { top: -15, left: '50%', transform: 'translateX(-50%)', }, 'bottom-left': { top: -15, left: 5 }, 'bottom-right': { top: -15, right: 5 }, right: { top: 'calc(50% - 8px)', left: -15, transform: 'rotate(270deg)', }, left: { top: 'calc(50% - 8px)', right: -15, transform: 'rotate(-270deg)', }, }; const Tooltip = ({ position, content, tight, children }) => { const [isActive, setIsActive] = useState(false); const handleMouseOver = () => { if (!isActive) { setIsActive(true); } }; const handleMouseOut = () => { if (isActive) { setIsActive(false); } }; return (