Sha256: eed396f09c1537a0d25b94c3645b304c15a7c306a53594e012b450e01aea45f6
Contents?: true
Size: 705 Bytes
Versions: 99
Compression:
Stored size: 705 Bytes
Contents
import React from 'react'; import { Col, Alert } from 'patternfly-react'; import PropTypes from 'prop-types'; const ErrorMsg = ({ error }) => { const status = error.statusText ? `${error.statusText}: ` : ''; return `${status}${error.errorMsg}`; }; const AnsibleRolesSwitcherError = ({ error }) => error && error.errorMsg ? ( <Col sm={12}> <Alert type="error"> <ErrorMsg error={error} /> </Alert> </Col> ) : ( '' ); AnsibleRolesSwitcherError.propTypes = { error: PropTypes.shape({ errorMsg: PropTypes.string, statusText: PropTypes.string, }), }; AnsibleRolesSwitcherError.defaultProps = { error: {}, }; export default AnsibleRolesSwitcherError;
Version data entries
99 entries across 99 versions & 1 rubygems