UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

169 lines 5.49 kB
var _Credit, _Expired, _CardIn, _Blocked, _Hourglass, _CardIn2, _CardIn3, _QuestionMark; import React from 'react'; import BankAxept from './BankAxept'; import DNB from './DNB'; import { clock_medium as Expired, padlock_medium as Blocked, card_in_medium as CardIn, hourglass as Hourglass, question_medium as QuestionMark } from '../../../icons'; import MastercardDefault from './MastercardDefault'; import MastercardDark from './MastercardDark'; import Pluss from './Pluss'; import Intro from './Intro'; import Business from './Business'; import Bedrift from './Bedrift'; import PB from './PB'; import SagaGold from './SagaGold'; import SagaPlatinum from './SagaPlatinum'; import VisaDefault from './VisaDefault'; import VisaPlatinum from './VisaPlatinum'; import Sbanken from './Sbanken'; import Credit from './Credit'; const BankLogo = _ref => { let { logoType, height } = _ref; return logoType.cata({ Colored: color => React.createElement(DNB, { height: height, fill: color, className: "dnb-payment-card__card__bank-logo" }), Sbanken: color => React.createElement(Sbanken, { height: height, fill: color, className: "dnb-payment-card__card__bank-logo" }) }); }; const ProductLogo = _ref2 => { var _SagaGold, _SagaPlatinum, _Pluss, _Intro, _Business, _Bedrift, _PB; let { productType, cardDesign } = _ref2; const id = 'dnb-payment-card__card__product-type'; return productType.cata({ Saga: () => cardDesign.saga.cata({ Gold: () => _SagaGold || (_SagaGold = React.createElement(SagaGold, { className: id })), Platinum: () => _SagaPlatinum || (_SagaPlatinum = React.createElement(SagaPlatinum, { className: id })), None: () => null }), Pluss: () => _Pluss || (_Pluss = React.createElement(Pluss, { className: id })), Intro: () => _Intro || (_Intro = React.createElement(Intro, { className: id })), Business: () => _Business || (_Business = React.createElement(Business, { className: id })), Bedrift: () => _Bedrift || (_Bedrift = React.createElement(Bedrift, { className: id })), PrivateBanking: () => cardDesign.privateBanking.cata({ Default: () => _PB || (_PB = React.createElement(PB, { className: id })), None: () => null }), None: () => null }); }; const BankAxeptLogo = _ref3 => { var _BankAxept, _BankAxept2, _BankAxept3, _BankAxept4, _BankAxept5, _BankAxept6; let { bankAxept, cardDesign } = _ref3; const id = 'dnb-payment-card__card__bank-axept'; return bankAxept.cata({ BankAxept: () => cardDesign.bankAxept.cata({ White: () => _BankAxept || (_BankAxept = React.createElement(BankAxept, { className: id, fill: "#ffffff" })), Black20: () => _BankAxept2 || (_BankAxept2 = React.createElement(BankAxept, { className: id, fill: "#cccccc" })), Gray: () => _BankAxept3 || (_BankAxept3 = React.createElement(BankAxept, { className: id, fill: "#b2b4b3" })), GrayDark: () => _BankAxept4 || (_BankAxept4 = React.createElement(BankAxept, { className: id, fill: "#55565A" })), Black: () => _BankAxept5 || (_BankAxept5 = React.createElement(BankAxept, { className: id, fill: "#333333" })), Gold: () => _BankAxept6 || (_BankAxept6 = React.createElement(BankAxept, { className: id, fill: "#BFA970" })) }), Credit: () => _Credit || (_Credit = React.createElement(Credit, { className: 'dnb-payment-card__card__credit', fill: "#fff" })), None: () => null }); }; const StatusIcon = _ref4 => { let { status } = _ref4; switch (status) { case 'expired': return _Expired || (_Expired = React.createElement(Expired, null)); case 'not_active': return _CardIn || (_CardIn = React.createElement(CardIn, null)); case 'blocked': return _Blocked || (_Blocked = React.createElement(Blocked, null)); case 'order_in_process': return _Hourglass || (_Hourglass = React.createElement(Hourglass, null)); case 'renewed': return _CardIn2 || (_CardIn2 = React.createElement(CardIn, null)); case 'replaced': return _CardIn3 || (_CardIn3 = React.createElement(CardIn, null)); case 'unknown': return _QuestionMark || (_QuestionMark = React.createElement(QuestionMark, null)); case 'active': default: return null; } }; const TypeLogo = _ref5 => { var _VisaPlatinum, _MastercardDefault, _MastercardDark; let { cardType, cardDesign } = _ref5; const id = 'dnb-payment-card__card__credit-type'; return cardType.cata({ Visa: () => cardDesign.visa.cata({ Colored: color => React.createElement(VisaDefault, { className: id, fill: color }), Platinum: () => _VisaPlatinum || (_VisaPlatinum = React.createElement(VisaPlatinum, { className: id })) }), Mastercard: () => cardDesign.mastercard.cata({ Default: () => _MastercardDefault || (_MastercardDefault = React.createElement(MastercardDefault, { className: id })), Dark: () => _MastercardDark || (_MastercardDark = React.createElement(MastercardDark, { className: id })) }), None: () => null }); }; export { BankLogo, ProductLogo, StatusIcon, TypeLogo, BankAxeptLogo }; //# sourceMappingURL=index.js.map