Sha256: 477f07e4982d7dc229149893e68a79cf03ea2321b5ced075619e6fc0f6c631fa
Contents?: true
Size: 912 Bytes
Versions: 122
Compression:
Stored size: 912 Bytes
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { Table } from 'react-bootstrap'; // using Map to preserve order const createRows = (details, mapping) => { const rows = []; /* eslint-disable no-restricted-syntax, react/jsx-closing-tag-location */ for (const key of mapping.keys()) { rows.push(<tr key={key}> <td><b>{mapping.get(key)}</b></td> <td>{Array.isArray(details[key]) ? details[key].join(', ') : details[key]}</td> </tr>); } /* eslint-enable no-restricted-syntax, react/jsx-closing-tag-location */ return rows; }; const ContentDetailInfo = ({ contentDetails, displayMap }) => ( <Table> <tbody> {createRows(contentDetails, displayMap)} </tbody> </Table> ); ContentDetailInfo.propTypes = { contentDetails: PropTypes.shape({}).isRequired, displayMap: PropTypes.instanceOf(Map).isRequired, }; export default ContentDetailInfo;
Version data entries
122 entries across 122 versions & 1 rubygems
Version | Path |
---|---|
katello-3.14.0.rc2 | webpack/components/Content/Details/ContentDetailInfo.js |
katello-3.14.0.rc1 | webpack/components/Content/Details/ContentDetailInfo.js |