mirror of
https://github.com/SomboChea/ui
synced 2024-11-05 06:04:28 +07:00
19 lines
511 B
TypeScript
19 lines
511 B
TypeScript
|
import React from 'react';
|
||
|
import Tooltip from '@material-ui/core/Tooltip';
|
||
|
|
||
|
import HeaderToolTipIcon, { TooltipIconType } from './HeaderToolTipIcon';
|
||
|
|
||
|
interface Props {
|
||
|
title: string;
|
||
|
tooltipIconType: TooltipIconType;
|
||
|
onClick?: () => void;
|
||
|
}
|
||
|
|
||
|
const HeaderToolTip: React.FC<Props> = ({ tooltipIconType, title, onClick }) => (
|
||
|
<Tooltip disableFocusListener={true} title={title}>
|
||
|
<HeaderToolTipIcon onClick={onClick} tooltipIconType={tooltipIconType} />
|
||
|
</Tooltip>
|
||
|
);
|
||
|
|
||
|
export default HeaderToolTip;
|