Demos
Basic example
Basic card using productCode.
Code Editor
<PaymentCard product_code="NK1" card_number="************1337" />
Custom card using rawData
You may have to import the extra named exports:
import PaymentCard, {getCardData,Designs,ProductType,CardType,BankAxeptType,} from '@dnb/eufemia/extensions/PaymentCard'
Code Editor
const customData = { productCode: 'UNDEFINED', productName: 'DNB Custom Card', displayName: 'Custom card', cardDesign: Designs.gold, cardType: CardType.Visa, productType: ProductType.None, bankAxept: BankAxeptType.BankAxept, } render( <PaymentCard product_code="UNDEFINED" raw_data={customData} card_number="************1337" />, )
Basic card using a status
Code Editor
<PaymentCard product_code="VG2" card_status="blocked" card_number="************1337" />
Basic card using product code and status.
Basic card in compact variant
NB: The compact variant have to be aligned to a not yet defined SSOT style.
Code Editor
<PaymentCard variant="compact" product_code="VG1" card_number="************1337" />
Demo cards
All the different card products and PaymentCard designs.
Default(NK4)
Default(NK5)
Default(VE1)
Default(VE2)
Saga(VG1)
Saga(VG4)
Saga(053)
Default(VK2)
Default(VK4)
Pluss(084)
Pluss(VL1)
Ung(VL2)
Pluss(VL3)
Default(VL4)
Ung(VL6)
Ung(085)
Default(VO1)
Saga platinum(VP2)
Private Banking(VP3)
Saga platinum(VP4)
Saga platinum(069)
Private Banking(VP5)
Private Banking(080)
My first(VX1)
Youth(VX3)
My first(VX4)
Youth(VX5)
Gold(096)
Ung(044)
Pluss(043)
Saga(098)
Saga platinum(074)
Private Banking(062)
Bedriftskort BankAxept(BK1)
Bedriftskort BankAxept(BP1)
Bedriftskort Visa(VB1)
Bedriftskort Visa(VB2)
Bedriftskort Visa(VB5)
Mastercard Black(P101)
Code Editor
const demoCards = [ 'NK1', 'NK4', 'NK5', 'VE1', 'VE2', 'VG1', 'VG4', '053', 'VK2', 'VK4', '084', 'VL1', 'VL2', 'VL3', 'VL4', 'VL6', '085', 'VO1', 'VP2', 'VP3', 'VP4', '069', 'VP5', '080', 'VX1', 'VX3', 'VX4', 'VX5', '096', '044', '043', '098', '074', '062', 'BK1', 'BP1', 'VB1', 'VB2', 'VB5', 'P101', ] const Cards = () => ( <> {demoCards.map((product_code) => { const cardData = getCardData(product_code) return ( <article key={product_code}> <H4> {cardData.cardDesign.name}({product_code}) </H4> <PaymentCard product_code={product_code} card_number="************1337" /> </article> ) })} </> ) render(<Cards />)