🤖 Merge PR #65837 [mercadopago-sdk-js] Added new value props for Wallet Brick (credits and smart) by @icaldana

* [mercadopago-sdk-js] Added new value props for Wallet Brick

* Addes tests
This commit is contained in:
Ismael Caldana
2023-06-23 13:37:23 -03:00
committed by GitHub
parent 81f6a9f444
commit ac95fe6086
2 changed files with 15 additions and 14 deletions

View File

@@ -56,6 +56,12 @@ brickBuilder.create('wallet', 'containerWallet', {
initialization: {
paymentId: 123456789,
},
customization: {
texts: {
action: 'pay',
valueProp: 'smart_option',
},
},
callbacks: {
onSubmit: (formData: any, additionalData: any) => {
return new Promise(() => {

View File

@@ -87,18 +87,6 @@ declare namespace bricks {
GREY = 'grey',
}
enum WalletButtonAction {
PAY = 'pay',
BUY = 'buy',
}
enum WalletButtonValueProp {
PRACTICALITY = 'practicality',
CONVENIENCE = 'convenience',
SECURITY_DETAILS = 'security_details',
SECURITY_SAFETY = 'security_safety',
}
enum WalletButtonRedirectMode {
MODAL = 'modal',
SELF = 'self',
@@ -151,8 +139,15 @@ declare namespace bricks {
}
interface WalletButtonTextCustomization {
action: WalletButtonAction;
valueProp: WalletButtonValueProp;
action: 'pay' | 'buy';
valueProp:
| 'practicality'
| 'convenience'
| 'convenience_all'
| 'security_details'
| 'security_safety'
| 'convenience_credits'
| 'smart_option';
}
interface StatusBrickBackUrls {