Sha256: ddf67269d94d0f0f226e7f01ae6af95cdb634076aed98d3749ce1ab51567343b

Contents?: true

Size: 708 Bytes

Versions: 10

Compression:

Stored size: 708 Bytes

Contents

import React from 'react';
import { ListView } from 'patternfly-react';
import { Tooltip } from '@patternfly/react-core';
import PropTypes from 'prop-types';

const InfoItem = ({ itemId, children, tooltipText }) => {
  const overlay = (
    <Tooltip content={tooltipText || ''} id={itemId}>
      {children}
    </Tooltip>
  );
  return (
    <ListView.InfoItem key={itemId} className="additional-info-wide">
      {tooltipText ? overlay : children}
    </ListView.InfoItem>
  );
};

InfoItem.propTypes = {
  itemId: PropTypes.string.isRequired,
  children: PropTypes.node,
  tooltipText: PropTypes.string,
};

InfoItem.defaultProps = {
  tooltipText: '',
  children: undefined,
};

export default InfoItem;

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
foreman_templates-10.0.2 webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js
foreman_templates-10.0.1 webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js
foreman_templates-10.0.0 webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js
foreman_templates-9.5.1 webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js
foreman_templates-9.5.0 webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js
foreman_templates-9.3.3 webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js
foreman_templates-9.3.2 webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js
foreman_templates-9.3.1 webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js
foreman_templates-9.4.0 webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js
foreman_templates-9.3.0 webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js