618ab5e195
* Refactor notificationHeaderButton * Add Tooltips to header buttons and replace reach/ui * Decrease --header-height by 20% * more header cherry-pick Co-authored-by: Rafael <rafael.saes@odysee.com>
30 lines
636 B
JavaScript
30 lines
636 B
JavaScript
// @flow
|
|
import React from 'react';
|
|
import MUITooltip from '@mui/material/Tooltip';
|
|
import type { Node } from 'react';
|
|
|
|
type Props = {
|
|
arrow?: boolean,
|
|
children: Node,
|
|
disableInteractive?: boolean,
|
|
enterDelay?: number,
|
|
title?: string | Node,
|
|
};
|
|
|
|
function Tooltip(props: Props) {
|
|
const { arrow = true, children, disableInteractive = true, enterDelay = 300, title } = props;
|
|
|
|
return (
|
|
<MUITooltip
|
|
arrow={arrow}
|
|
disableInteractive={disableInteractive}
|
|
enterDelay={enterDelay}
|
|
enterNextDelay={enterDelay}
|
|
title={title}
|
|
>
|
|
{children}
|
|
</MUITooltip>
|
|
);
|
|
}
|
|
|
|
export default Tooltip;
|