UNPKG

chayns-components

Version:

A set of beautiful React components for developing chayns® applications.

47 lines (46 loc) 1.23 kB
import React from 'react'; import { PropTypes } from 'prop-types'; import Badge from '../../react-chayns-badge/component/Badge'; const SetupItemRight = _ref => { let { right, ready = false } = _ref; const getReady = () => { if (right) { if (right.complete) { return right.complete; } return right; } return /*#__PURE__*/React.createElement(Badge, null, /*#__PURE__*/React.createElement("i", { className: "ts-check chayns__color--headline ", style: { display: 'flex', alignItems: 'center', fontSize: '1rem' } })); }; const getNotReady = () => { if (right) { if (right.notComplete) { return right.notComplete; } return right; } return null; }; return /*#__PURE__*/React.createElement("div", { className: "accordion__head__right" }, ready ? getReady() : getNotReady()); }; SetupItemRight.propTypes = { ready: PropTypes.bool, right: PropTypes.oneOfType([PropTypes.node.isRequired, PropTypes.shape({ complete: PropTypes.node.isRequired, notComplete: PropTypes.node.isRequired }).isRequired]) }; export default SetupItemRight; //# sourceMappingURL=SetupItemRight.js.map