verdaccio-ui/src/components/Header/HeaderToolTip.tsx
2019-10-12 08:45:39 +02:00

20 lines
514 B
TypeScript

import React from 'react';
import Tooltip from '../../muiComponents/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;