Sha256: eaddcec551f47c44e536314b5f1659f36ef239bcfc4942c38a46496ff5fad7f3
Contents?: true
Size: 1006 Bytes
Versions: 67
Compression:
Stored size: 1006 Bytes
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { CheckCircleIcon, ExclamationCircleIcon, QuestionCircleIcon, } from '@patternfly/react-icons'; import { JOB_SUCCESS_STATUS, JOB_ERROR_STATUS } from './constants'; import './styles.scss'; const JobStatusIcon = ({ status, children, ...props }) => { switch (status) { case JOB_SUCCESS_STATUS: return ( <span className="job-success"> <CheckCircleIcon {...props} /> {children} </span> ); case JOB_ERROR_STATUS: return ( <span className="job-error"> <ExclamationCircleIcon {...props} /> {children} </span> ); default: return ( <span className="job-info"> <QuestionCircleIcon {...props} /> {children} </span> ); } }; JobStatusIcon.propTypes = { status: PropTypes.number, children: PropTypes.string.isRequired, }; JobStatusIcon.defaultProps = { status: undefined, }; export default JobStatusIcon;
Version data entries
67 entries across 67 versions & 1 rubygems