2019-10-03 23:17:04 +07:00
|
|
|
import React, { forwardRef } from 'react';
|
2019-10-06 23:30:05 +07:00
|
|
|
import { default as MaterialUITooltip, TooltipProps } from '@material-ui/core/Tooltip';
|
2019-10-03 23:17:04 +07:00
|
|
|
|
|
|
|
// The default element type of MUI's Tooltip is 'div' and the change of this prop is not allowed
|
2019-10-12 13:45:39 +07:00
|
|
|
type TooltipRef = HTMLDivElement;
|
2019-10-03 23:17:04 +07:00
|
|
|
|
|
|
|
const Tooltip = forwardRef<TooltipRef, TooltipProps>(function ToolTip(props, ref) {
|
2019-10-06 23:30:05 +07:00
|
|
|
return <MaterialUITooltip {...props} innerRef={ref} />;
|
2019-10-03 23:17:04 +07:00
|
|
|
});
|
|
|
|
|
|
|
|
export default Tooltip;
|