import React from 'react';
import { ListView, OverlayTrigger, Tooltip } from 'patternfly-react';
import PropTypes from 'prop-types';
const InfoItem = ({ itemId, children, tooltipText }) => {
const overlay = (
{tooltipText} : ''}
placement="top"
trigger={['hover', 'focus']}
rootClose={false}
>
{children}
);
return (
{tooltipText ? overlay : children}
);
};
InfoItem.propTypes = {
itemId: PropTypes.string.isRequired,
children: PropTypes.node,
tooltipText: PropTypes.string,
};
InfoItem.defaultProps = {
tooltipText: '',
children: undefined,
};
export default InfoItem;