UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

65 lines (64 loc) 1.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StatusIcon = void 0; var _react = _interopRequireDefault(require("react")); var _index = require("../../../../icons/index.js"); var _jsxRuntime = require("react/jsx-runtime"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } const statusIconMap = { renewed: { Icon: _index.reset_medium, className: 'icon--fill' }, replaced: { Icon: _index.refresh_medium, className: 'icon--fill' }, new: { Icon: _index.confetti_medium, className: 'icon--fill' }, expired: { Icon: _index.clock_medium, className: 'icon--stroke' }, notActive: { Icon: _index.stop_medium, className: 'icon--stroke' }, blocked: { Icon: _index.padlock_medium, className: 'icon--stroke' }, newOrder: { Icon: _index.shopping_cart_medium, className: 'icon--stroke' }, orderInProcess: { Icon: _index.email_medium, className: 'icon--stroke' }, unknown: { Icon: _index.question_medium, className: 'icon--stroke' } }; const StatusIcon = ({ status }) => { const entry = statusIconMap[status]; if (!entry) { return null; } const { Icon, className } = entry; return (0, _jsxRuntime.jsx)(Icon, { className: className }); }; exports.StatusIcon = StatusIcon; //# sourceMappingURL=index.js.map