Sha256: eb27268068c60e2ea995666f3303caccbdbe1635629977205a0ab373e395b3f3

Contents?: true

Size: 918 Bytes

Versions: 3

Compression:

Stored size: 918 Bytes

Contents

import React from 'react';
import { ListView } from 'patternfly-react';
import PropTypes from 'prop-types';
import ListItemStatus from '../ListItemStatus';
import Dashboard from '../../../Dashboard';

const ListItem = ({ label, account }) => (
  <ListView.Item
    leftContent={<ListView.Icon name="user" />}
    heading={label}
    additionalInfo={[
      <ListItemStatus key={`${label}_status`} account={account} />,
    ]}
    stacked
    hideCloseIcon
  >
    <Dashboard accountID={account.id} account={account} />
  </ListView.Item>
);

ListItem.propTypes = {
  label: PropTypes.string.isRequired,
  account: PropTypes.shape({
    generate_report_status: PropTypes.string,
    upload_report_status: PropTypes.string,
    id: PropTypes.number,
  }),
};

ListItem.defaultProps = {
  account: {
    generate_report_status: 'unknown',
    upload_report_status: 'unknown',
    id: 0,
  },
};

export default ListItem;

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_rh_cloud-2.0.18.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-1.0.18 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-2.0.18 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js