♻️ Improve location naming in React

This commit is contained in:
Philipp Stracker 2025-01-17 16:34:06 +01:00
parent e00b95fd1d
commit b866ac79f6
No known key found for this signature in database
2 changed files with 9 additions and 9 deletions

View file

@ -13,20 +13,20 @@ export const STYLING_LOCATIONS = {
link: 'https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-cart',
props: { layout: false, tagline: false },
},
'classic-checkout': {
value: 'classic-checkout',
classicCheckout: {
value: 'classicCheckout',
label: __( 'Classic Checkout', 'woocommerce-paypal-payments' ),
link: 'https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-checkout',
props: { layout: true, tagline: true },
},
'express-checkout': {
value: 'express-checkout',
expressCheckout: {
value: 'expressCheckout',
label: __( 'Express Checkout', 'woocommerce-paypal-payments' ),
link: 'https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-block-express-checkout',
props: { layout: false, tagline: false },
},
'mini-cart': {
value: 'mini-cart',
miniCart: {
value: 'miniCart',
label: __( 'Mini Cart', 'woocommerce-paypel-payements' ),
link: 'https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-mini-cart',
props: { layout: true, tagline: true },

View file

@ -34,7 +34,7 @@ const defaultPersistent = Object.freeze( {
shape: STYLING_SHAPES.rect.value,
color: STYLING_COLORS.gold.value,
} ),
[ STYLING_LOCATIONS[ 'classic-checkout' ].value ]: Object.freeze( {
[ STYLING_LOCATIONS.classicCheckout.value ]: Object.freeze( {
enabled: true,
methods: [],
label: STYLING_LABELS.checkout.value,
@ -43,14 +43,14 @@ const defaultPersistent = Object.freeze( {
layout: STYLING_LAYOUTS.vertical.value,
tagline: false,
} ),
[ STYLING_LOCATIONS[ 'express-checkout' ].value ]: Object.freeze( {
[ STYLING_LOCATIONS.expressCheckout.value ]: Object.freeze( {
enabled: true,
methods: [],
label: STYLING_LABELS.checkout.value,
shape: STYLING_SHAPES.rect.value,
color: STYLING_COLORS.gold.value,
} ),
[ STYLING_LOCATIONS[ 'mini-cart' ].value ]: Object.freeze( {
[ STYLING_LOCATIONS.miniCart.value ]: Object.freeze( {
enabled: true,
methods: [],
label: STYLING_LABELS.pay.value,