lbry-desktop/ui/component/common/tooltip.jsx

31 lines
636 B
React
Raw Permalink Normal View History

2018-03-26 23:32:43 +02:00
// @flow
import React from 'react';
import MUITooltip from '@mui/material/Tooltip';
import type { Node } from 'react';
2018-03-26 23:32:43 +02:00
type Props = {
arrow?: boolean,
children: Node,
disableInteractive?: boolean,
enterDelay?: number,
title?: string | Node,
2018-03-26 23:32:43 +02:00
};
function Tooltip(props: Props) {
const { arrow = true, children, disableInteractive = true, enterDelay = 300, title } = props;
2018-03-26 23:32:43 +02:00
return (
<MUITooltip
arrow={arrow}
disableInteractive={disableInteractive}
enterDelay={enterDelay}
enterNextDelay={enterDelay}
title={title}
>
{children}
</MUITooltip>
);
2018-03-26 23:32:43 +02:00
}
export default Tooltip;