mirror of
https://github.com/SomboChea/ui
synced 2024-09-29 12:57:52 +07:00
12 lines
435 B
TypeScript
12 lines
435 B
TypeScript
import React, { forwardRef } from 'react';
|
|
import { default as MaterialUITooltip, TooltipProps } from '@material-ui/core/Tooltip';
|
|
|
|
// The default element type of MUI's Tooltip is 'div' and the change of this prop is not allowed
|
|
type TooltipRef = HTMLDivElement;
|
|
|
|
const Tooltip = forwardRef<TooltipRef, TooltipProps>(function ToolTip(props, ref) {
|
|
return <MaterialUITooltip {...props} innerRef={ref} />;
|
|
});
|
|
|
|
export default Tooltip;
|