2018-03-26 23:32:43 +02:00
|
|
|
// @flow
|
2019-06-28 09:27:55 +02:00
|
|
|
import React from 'react';
|
2022-01-27 03:14:36 +01:00
|
|
|
import MUITooltip from '@mui/material/Tooltip';
|
|
|
|
import type { Node } from 'react';
|
2018-03-26 23:32:43 +02:00
|
|
|
|
|
|
|
type Props = {
|
2022-01-27 03:14:36 +01:00
|
|
|
arrow?: boolean,
|
2019-10-17 18:51:16 +02:00
|
|
|
children: Node,
|
2022-01-27 03:14:36 +01:00
|
|
|
disableInteractive?: boolean,
|
|
|
|
enterDelay?: number,
|
|
|
|
title?: string | Node,
|
2018-03-26 23:32:43 +02:00
|
|
|
};
|
|
|
|
|
2019-06-28 09:27:55 +02:00
|
|
|
function Tooltip(props: Props) {
|
2022-01-27 03:14:36 +01:00
|
|
|
const { arrow = true, children, disableInteractive = true, enterDelay = 300, title } = props;
|
2018-03-26 23:32:43 +02:00
|
|
|
|
2022-01-27 03:14:36 +01:00
|
|
|
return (
|
|
|
|
<MUITooltip
|
|
|
|
arrow={arrow}
|
|
|
|
disableInteractive={disableInteractive}
|
|
|
|
enterDelay={enterDelay}
|
|
|
|
enterNextDelay={enterDelay}
|
|
|
|
title={title}
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</MUITooltip>
|
|
|
|
);
|
2018-03-26 23:32:43 +02:00
|
|
|
}
|
|
|
|
|
2019-06-28 09:27:55 +02:00
|
|
|
export default Tooltip;
|