Skip to content

Commit

Permalink
docs(PaymentCard): change imports of types to /payment-card
Browse files Browse the repository at this point in the history
  • Loading branch information
langz authored and tujoworker committed May 31, 2023
1 parent 44eeeb8 commit 41dc3ce
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,18 @@ Changed `img_class` prop to be `imgClass`.
### [PaymentCard](/uilib/extensions/payment-card/)

1. `Type`'s `DNB` value/option `Metalic` was removed.
2. `Type`'s `Saga` value/option `VisaPlatinum` was removed.
3. `Type`'s `PB` value/option `Platinum` was removed.
4. `Type`'s `Mastercard` value/option `DefaultWhite` was removed.
5. `Type`'s `Mastercard` value/option `Metalic` was removed.
6. `Type`'s `Mastercard` value/option `BlackMetalic` was removed.
7. `Type`'s `Visa` value/option `Metalic` was removed.
8. `CardDesign`'s value/option `white` was removed. If used as a default design, consider replacing it with `defaultDesign`.
9. `CardDesign`'s value/option `silver` was removed.
10. `ProductType`'s value/option `BankAxept` was removed.
1. `Type`'s `Saga` value/option `VisaPlatinum` was removed.
1. `Type`'s `PB` value/option `Platinum` was removed.
1. `Type`'s `Mastercard` value/option `DefaultWhite` was removed.
1. `Type`'s `Mastercard` value/option `Metalic` was removed.
1. `Type`'s `Mastercard` value/option `BlackMetalic` was removed.
1. `Type`'s `Visa` value/option `Metalic` was removed.
1. `CardDesign`'s value/option `white` was removed. If used as a default design, consider replacing it with `defaultDesign`.
1. `CardDesign`'s value/option `silver` was removed.
1. `ProductType`'s value/option `BankAxept` was removed.
1. For better TypeScript support, import `CardType` from `/payment-card` instead of from `/payment-card/utils/Types`.
1. Find `import { CardType } from '@dnb/eufemia/extensions/payment-card/utils/Types'`, and replace with `import { CardType } from '@dnb/eufemia/extensions/payment-card'`
1. For better TypeScript support, import `ProductType` from `/payment-card` instead of from `/payment-card/utils/Types`.
1. Find `import { ProductType } from '@dnb/eufemia/extensions/payment-card/utils/Types'`, and replace with `import { ProductType } from '@dnb/eufemia/extensions/payment-card'`

_April, 20. 2023_
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ showTabs: true

## Card Data

| Properties | Type | Description |
| ------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `productCode` | `string` | _(required)_ product code for the given card. |
| `productName` | `string` | _(required)_ product name. Can be blank. |
| `displayName` | `string` | _(required)_ the visible product name. Can be empty. |
| `cardDesign` | `object` | _(required)_ object that describes the style properties of the card. can be imported from `@dnb/eufemia/extensions/payment-card/utils/CardDesigns` (see available designs below) or a custom one can be created. |
| `cardType` | `Union Type` | _(required)_ import CardType from `@dnb/eufemia/extensions/payment-card/utils/Types` to use. Can be CardType.Visa, CardType.Mastercard or CardType.None |
| `productType` | `Union Type` | _(required)_ import ProductType from `@dnb/eufemia/extensions/payment-card/utils/Types` to use. Can be ProductType.Saga, ProductType.Pluss, ProductType.Intro, ProductType.Business, ProductType.Bedrift, ProductType.PrivateBanking or ProductType.None |
| Properties | Type | Description |
| ------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `productCode` | `string` | _(required)_ product code for the given card. |
| `productName` | `string` | _(required)_ product name. Can be blank. |
| `displayName` | `string` | _(required)_ the visible product name. Can be empty. |
| `cardDesign` | `object` | _(required)_ object that describes the style properties of the card. `import { Designs } from '@dnb/eufemia/extensions/payment-card'` (see available designs below) or a custom one can be created. |
| `cardType` | `Union Type` | _(required)_ `import { CardType } from '@dnb/eufemia/extensions/payment-card'` to use. Can be CardType.Visa, CardType.Mastercard or CardType.None |
| `productType` | `Union Type` | _(required)_ `import { ProductType } from '@dnb/eufemia/extensions/payment-card'` to use. Can be ProductType.Saga, ProductType.Pluss, ProductType.Intro, ProductType.Business, ProductType.Bedrift, ProductType.PrivateBanking or ProductType.None |

## Card Design

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ import { H3 } from '../../..'

import '../style'
import '../style/themes/ui'
import PaymentCard, { getCardData } from '../../../extensions/payment-card'
import PaymentCard, {
getCardData,
Designs,
CardType,
ProductType,
BankAxeptType,
} from '../../../extensions/payment-card'
import cardData from '../utils/cardProducts'
import { Designs } from '../PaymentCard'
import { CardType } from '../PaymentCard'
import { ProductType } from '../PaymentCard'
import { BankAxeptType } from '../PaymentCard'

export default {
title: 'Eufemia/Extensions/PaymentCard',
Expand Down

0 comments on commit 41dc3ce

Please sign in to comment.