import * as React from 'react' ; import Tooltip from '@material-ui/core/Tooltip' ; export const TOOLTIP_LEAVE_DELAY = 0 ; export const TOOLTIP_ENTER_DELAY = 500 ; export const TOOLTIP_ENTER_NEXT_DELAY = 500 ; interface IProps { readonly children : React . ReactElement ; /**
     * If the tooltip isn't specified we don't use a tooltip.
     */ readonly title ? : string ; readonly placement ? : 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top' ; } export const MUITooltip = React . memo ( function MUITooltip ( props ) { if ( props . title === undefined ) { return props . children ; } return ( < Tooltip title = { props . title } arrow = { true } placement = { props . placement } disableTouchListener = { true } disableFocusListener = { true } enterNextDelay = { TOOLTIP_ENTER_NEXT_DELAY } enterDelay = { TOOLTIP_ENTER_DELAY } leaveDelay = { TOOLTIP_LEAVE_DELAY } > { props . children } < /Tooltip>); } ) ;