diff --git a/client/src/components/Logs/Tooltip/index.js b/client/src/components/Logs/Tooltip/index.js index 34be676118d..0115e695346 100644 --- a/client/src/components/Logs/Tooltip/index.js +++ b/client/src/components/Logs/Tooltip/index.js @@ -3,37 +3,34 @@ import PropTypes from 'prop-types'; import ReactTooltip from 'react-tooltip'; import classNames from 'classnames'; import './ReactTooltip.css'; +import { TouchMediaQuery } from '../../../helpers/constants'; -class Tooltip extends React.Component { - render() { - const { - id, children, className = '', place = 'right', trigger = 'hover', overridePosition, scrollHide = true, - } = this.props; +const Tooltip = ({ + id, children, className = '', place = 'right', trigger = 'hover', overridePosition, scrollHide = true, +}) => { + const tooltipClassName = classNames('custom-tooltip', className); - const tooltipClassName = classNames('custom-tooltip', className); - - return ( - - {children} - - ); - } -} + return ( + + {children} + + ); +}; Tooltip.propTypes = { id: PropTypes.string.isRequired, diff --git a/client/src/helpers/constants.js b/client/src/helpers/constants.js index 9f2fad40467..30ea041edd6 100644 --- a/client/src/helpers/constants.js +++ b/client/src/helpers/constants.js @@ -503,3 +503,5 @@ export const FORM_NAME = { }; export const smallScreenSize = 767; + +export const TouchMediaQuery = '(hover: none)';