import Tooltip from "@material-ui/core/Tooltip" ; import React from "react" ; interface ButtonTooltipDecoratorProps { tooltip ? : string ; } export const ButtonTooltipDecorator = ( { tooltip , children , } ) => { if ( tooltip ) { return ( < Tooltip title = { tooltip } placement = "top" > < span > { children } < /span> < /Tooltip>); } return < > { children } < />; } ; ButtonTooltipDecorator . displayName = "ButtonTooltipDecorator" ;