Sha256: 4ae5e92732f739cfda0d1ff590669cd7982751470dddc56b43f99e279c883ff8
Contents?: true
Size: 1.13 KB
Versions: 5
Compression:
Stored size: 1.13 KB
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { UnknownIcon } from '@patternfly/react-icons'; import { sprintf, translate as __ } from 'foremanReact/common/I18n'; import formats from './formatImages'; import './FormatCell.scss'; const FormatCell = ({ format }) => { switch (format) { case 'plain': return ( <UnknownIcon size="md" title={__('Obsolete or custom report formats')} /> ); case 'puppet': return ( <img className="format-img" src={formats.puppet} alt="Puppet" title={sprintf(__('Reported by %s'), 'Puppet')} /> ); case 'ansible': return ( <img className="format-img" src={formats.ansible} alt="Ansible" title={sprintf(__('Reported by %s'), 'Ansible')} /> ); default: return ( <UnknownIcon size="md" title={sprintf(__('Reported by %s'), format)} /> ); } }; FormatCell.propTypes = { format: PropTypes.string, }; FormatCell.defaultProps = { format: 'plain', }; export default FormatCell;
Version data entries
5 entries across 5 versions & 1 rubygems