-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PayMe and PayNow improvements (#2910)
* PayNow improvements (#2889) * rendering instructions for mobile * using bento tokens * changeset * draft stepper * fixed stories * translations and css changes * Fixed test * adjusted timeline component and css fixes * fixed test * applied review comments * PayMe improvements (#2909) * Payconic labels fix (#2916) * using token fn
- Loading branch information
1 parent
04918e1
commit 4fb7df4
Showing
35 changed files
with
541 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@adyen/adyen-web': patch | ||
--- | ||
|
||
Payconic - Adjusted QR code message and removed unused button label. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@adyen/adyen-web': minor | ||
--- | ||
|
||
PayMe - Improved instructions UI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@adyen/adyen-web': minor | ||
--- | ||
|
||
PayNow - Adding instructions to scan QR code on mobile view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/lib/src/components/PayMe/components/PayMeInstructions.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { useIsMobile } from '../../../utils/useIsMobile'; | ||
import { useCoreContext } from '../../../core/Context/CoreProvider'; | ||
import { Timeline, TimelineWrapper } from '../../internal/Timeline'; | ||
import { h } from 'preact'; | ||
|
||
const PayMeInstructions = () => { | ||
const { i18n } = useCoreContext(); | ||
const { isMobileScreenSize } = useIsMobile(); | ||
|
||
if (isMobileScreenSize) { | ||
return null; | ||
} | ||
|
||
const instructions = i18n.get('payme.instructions.steps').split('%@'); | ||
|
||
return ( | ||
<TimelineWrapper> | ||
<Timeline instructions={instructions} /> | ||
</TimelineWrapper> | ||
); | ||
}; | ||
|
||
export { PayMeInstructions }; |
21 changes: 21 additions & 0 deletions
21
packages/lib/src/components/PayMe/components/PayMeIntroduction.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { useCoreContext } from '../../../core/Context/CoreProvider'; | ||
import { useIsMobile } from '../../../utils/useIsMobile'; | ||
import { Timeline, TimelineWrapper } from '../../internal/Timeline'; | ||
import { Fragment, h } from 'preact'; | ||
|
||
const PayMeIntroduction = () => { | ||
const { i18n } = useCoreContext(); | ||
const { isMobileScreenSize } = useIsMobile(); | ||
|
||
const instructions = i18n.get('payme.instructions.steps').split('%@'); | ||
|
||
return isMobileScreenSize ? ( | ||
<TimelineWrapper> | ||
<Timeline instructions={instructions} /> | ||
</TimelineWrapper> | ||
) : ( | ||
<Fragment>{i18n.get('payme.scanQrCode')}</Fragment> | ||
); | ||
}; | ||
|
||
export { PayMeIntroduction }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/lib/src/components/PayNow/components/PayNowInstructions.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@import 'styles/variable-generator'; | ||
|
||
.adyen-checkout-paynow__instructions { | ||
font-size: token(text-body-font-size); | ||
font-weight: token(text-body-font-weight); | ||
line-height: token(text-body-line-height); | ||
color: token(color-label-primary); | ||
text-align: center; | ||
} | ||
|
||
.adyen-checkout-paynow__instructions > p { | ||
margin-bottom: 0; | ||
} |
21 changes: 21 additions & 0 deletions
21
packages/lib/src/components/PayNow/components/PayNowInstructions.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { h } from 'preact'; | ||
import { useCoreContext } from '../../../core/Context/CoreProvider'; | ||
import ContentSeparator from '../../internal/ContentSeparator'; | ||
import './PayNowInstructions.scss'; | ||
import { useIsMobile } from '../../../utils/useIsMobile'; | ||
|
||
const PayNowInstructions = () => { | ||
const { i18n } = useCoreContext(); | ||
const { isMobileScreenSize } = useIsMobile(); | ||
|
||
if (!isMobileScreenSize) return; | ||
|
||
return ( | ||
<div className="adyen-checkout-paynow__instructions"> | ||
<ContentSeparator /> | ||
<p>{i18n.get('paynow.scanQrCode')}</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export { PayNowInstructions }; |
9 changes: 9 additions & 0 deletions
9
packages/lib/src/components/PayNow/components/PayNowIntroduction.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@import 'styles/variable-generator'; | ||
|
||
.adyen-checkout-paynow__introduction { | ||
font-size: token(text-body-font-size); | ||
font-weight: token(text-body-font-weight); | ||
line-height: token(text-body-line-height); | ||
color: token(color-label-primary); | ||
text-align: center; | ||
} |
32 changes: 32 additions & 0 deletions
32
packages/lib/src/components/PayNow/components/PayNowIntroduction.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { h } from 'preact'; | ||
import { useCoreContext } from '../../../core/Context/CoreProvider'; | ||
import './PayNowIntroduction.scss'; | ||
import { TimelineWrapper, Timeline } from '../../internal/Timeline'; | ||
import { useIsMobile } from '../../../utils/useIsMobile'; | ||
|
||
const PayNowIntroduction = () => { | ||
const { i18n } = useCoreContext(); | ||
const { isMobileScreenSize } = useIsMobile(); | ||
|
||
const instructions = [ | ||
i18n.get('paynow.mobileViewInstruction.step1'), | ||
i18n.get('paynow.mobileViewInstruction.step2'), | ||
i18n.get('paynow.mobileViewInstruction.step3'), | ||
i18n.get('paynow.mobileViewInstruction.step4'), | ||
i18n.get('paynow.mobileViewInstruction.step5') | ||
]; | ||
|
||
return ( | ||
<div className="adyen-checkout-paynow__introduction" data-testid="paynow-introduction"> | ||
{isMobileScreenSize ? ( | ||
<TimelineWrapper> | ||
<Timeline instructions={instructions} /> | ||
</TimelineWrapper> | ||
) : ( | ||
i18n.get('paynow.scanQrCode') | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export { PayNowIntroduction }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.adyen-checkout__qr-loader--swish > .adyen-checkout__qr-loader__instructions { | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.