From b96936de16c35a7b0f5475253aef4855163dfc5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Ferreira?= Date: Mon, 9 Dec 2024 14:29:23 +0100 Subject: [PATCH] Feat: enable logos for SK and CZ online banking (#2939) * feat: enable logos for SK and CZ online banking * changeset * update SK currency to EUR on playgrounds --- .changeset/thirty-boats-applaud.md | 5 ++++ examples/angular/src/utils/getCurrency.ts | 1 - examples/nextjs/app/_utils/amount-utils.ts | 1 - examples/nextjs/app/_utils/getCurrency.ts | 1 - examples/nuxt/utils/getCurrency.ts | 1 - .../src/components/OnlineBankingCZ/index.ts | 2 +- .../src/components/OnlineBankingSK/index.ts | 2 +- .../issuer-lists/OnlineBankingCZ.stories.tsx | 24 +++++++++++++++++++ .../issuer-lists/OnlineBankingSK.stories.tsx | 24 +++++++++++++++++++ packages/lib/storybook/utils/get-currency.ts | 1 - packages/playground/src/config/getCurrency.js | 1 - 11 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 .changeset/thirty-boats-applaud.md create mode 100644 packages/lib/storybook/stories/issuer-lists/OnlineBankingCZ.stories.tsx create mode 100644 packages/lib/storybook/stories/issuer-lists/OnlineBankingSK.stories.tsx diff --git a/.changeset/thirty-boats-applaud.md b/.changeset/thirty-boats-applaud.md new file mode 100644 index 0000000000..cb95306ff9 --- /dev/null +++ b/.changeset/thirty-boats-applaud.md @@ -0,0 +1,5 @@ +--- +'@adyen/adyen-web': minor +--- + +Feat: enable logos for SK and CZ online banking diff --git a/examples/angular/src/utils/getCurrency.ts b/examples/angular/src/utils/getCurrency.ts index fcd9965978..af652b0a91 100644 --- a/examples/angular/src/utils/getCurrency.ts +++ b/examples/angular/src/utils/getCurrency.ts @@ -26,7 +26,6 @@ const currencies: Record = { RU: 'RUB', SE: 'SEK', SG: 'SGD', - SK: 'SKK', TH: 'THB', TW: 'TWD', US: 'USD', diff --git a/examples/nextjs/app/_utils/amount-utils.ts b/examples/nextjs/app/_utils/amount-utils.ts index cae652b2d2..55475dd790 100644 --- a/examples/nextjs/app/_utils/amount-utils.ts +++ b/examples/nextjs/app/_utils/amount-utils.ts @@ -26,7 +26,6 @@ const currencies = { RU: "RUB", SE: "SEK", SG: "SGD", - SK: "SKK", TH: "THB", TW: "TWD", US: "USD", diff --git a/examples/nextjs/app/_utils/getCurrency.ts b/examples/nextjs/app/_utils/getCurrency.ts index 989688192c..6438e5109d 100644 --- a/examples/nextjs/app/_utils/getCurrency.ts +++ b/examples/nextjs/app/_utils/getCurrency.ts @@ -26,7 +26,6 @@ const currencies = { RU: "RUB", SE: "SEK", SG: "SGD", - SK: "SKK", TH: "THB", TW: "TWD", US: "USD", diff --git a/examples/nuxt/utils/getCurrency.ts b/examples/nuxt/utils/getCurrency.ts index fcd9965978..af652b0a91 100644 --- a/examples/nuxt/utils/getCurrency.ts +++ b/examples/nuxt/utils/getCurrency.ts @@ -26,7 +26,6 @@ const currencies: Record = { RU: 'RUB', SE: 'SEK', SG: 'SGD', - SK: 'SKK', TH: 'THB', TW: 'TWD', US: 'USD', diff --git a/packages/lib/src/components/OnlineBankingCZ/index.ts b/packages/lib/src/components/OnlineBankingCZ/index.ts index fcd87818f5..b2ceb8e99e 100644 --- a/packages/lib/src/components/OnlineBankingCZ/index.ts +++ b/packages/lib/src/components/OnlineBankingCZ/index.ts @@ -15,7 +15,7 @@ class OnlineBankingCZElement extends IssuerListContainer { formatProps(props) { return { ...super.formatProps(props), - showImage: false, + showImage: true, termsAndConditions: OnlineBankingCZElement.termsAndConditions }; } diff --git a/packages/lib/src/components/OnlineBankingSK/index.ts b/packages/lib/src/components/OnlineBankingSK/index.ts index d2213d4221..8d63849140 100644 --- a/packages/lib/src/components/OnlineBankingSK/index.ts +++ b/packages/lib/src/components/OnlineBankingSK/index.ts @@ -15,7 +15,7 @@ class OnlineBankingSKElement extends IssuerListContainer { formatProps(props) { return { ...super.formatProps(props), - showImage: false, + showImage: true, termsAndConditions: OnlineBankingSKElement.termsAndConditions }; } diff --git a/packages/lib/storybook/stories/issuer-lists/OnlineBankingCZ.stories.tsx b/packages/lib/storybook/stories/issuer-lists/OnlineBankingCZ.stories.tsx new file mode 100644 index 0000000000..616b219f04 --- /dev/null +++ b/packages/lib/storybook/stories/issuer-lists/OnlineBankingCZ.stories.tsx @@ -0,0 +1,24 @@ +import { MetaConfiguration, StoryConfiguration } from '../types'; +import { ComponentContainer } from '../ComponentContainer'; +import { IssuerListConfiguration } from '../../../src/components/helpers/IssuerListContainer/types'; +import { Checkout } from '../Checkout'; +import { OnlineBankingCZ } from '../../../src'; + +type OnlineBankingCZStory = StoryConfiguration; + +const meta: MetaConfiguration = { + title: 'IssuerList/OnlineBankingCZ' +}; + +export const Default: OnlineBankingCZStory = { + render: ({ componentConfiguration, ...checkoutConfig }) => ( + + {checkout => } + + ), + args: { + countryCode: 'CZ' + } +}; + +export default meta; diff --git a/packages/lib/storybook/stories/issuer-lists/OnlineBankingSK.stories.tsx b/packages/lib/storybook/stories/issuer-lists/OnlineBankingSK.stories.tsx new file mode 100644 index 0000000000..18e7cf62a9 --- /dev/null +++ b/packages/lib/storybook/stories/issuer-lists/OnlineBankingSK.stories.tsx @@ -0,0 +1,24 @@ +import { MetaConfiguration, StoryConfiguration } from '../types'; +import { ComponentContainer } from '../ComponentContainer'; +import { IssuerListConfiguration } from '../../../src/components/helpers/IssuerListContainer/types'; +import { Checkout } from '../Checkout'; +import { OnlineBankingSK } from '../../../src'; + +type OnlineBankingSKStory = StoryConfiguration; + +const meta: MetaConfiguration = { + title: 'IssuerList/OnlineBankingSK' +}; + +export const Default: OnlineBankingSKStory = { + render: ({ componentConfiguration, ...checkoutConfig }) => ( + + {checkout => } + + ), + args: { + countryCode: 'SK' + } +}; + +export default meta; diff --git a/packages/lib/storybook/utils/get-currency.ts b/packages/lib/storybook/utils/get-currency.ts index 0241e367a1..eb13e4a2df 100644 --- a/packages/lib/storybook/utils/get-currency.ts +++ b/packages/lib/storybook/utils/get-currency.ts @@ -28,7 +28,6 @@ const currencies: Record = { RU: 'RUB', SE: 'SEK', SG: 'SGD', - SK: 'SKK', TH: 'THB', TW: 'TWD', US: 'USD', diff --git a/packages/playground/src/config/getCurrency.js b/packages/playground/src/config/getCurrency.js index 9236b2da82..50073dca0c 100644 --- a/packages/playground/src/config/getCurrency.js +++ b/packages/playground/src/config/getCurrency.js @@ -27,7 +27,6 @@ const currencies = { RU: 'RUB', SE: 'SEK', SG: 'SGD', - SK: 'SKK', TH: 'THB', TW: 'TWD', US: 'USD',