diff --git a/src/FormBuilder/resources/js/form-builder/src/blocks/fields/payment-gateways/Edit.tsx b/src/FormBuilder/resources/js/form-builder/src/blocks/fields/payment-gateways/Edit.tsx index 2297b3ba0f..3a4d7639e6 100644 --- a/src/FormBuilder/resources/js/form-builder/src/blocks/fields/payment-gateways/Edit.tsx +++ b/src/FormBuilder/resources/js/form-builder/src/blocks/fields/payment-gateways/Edit.tsx @@ -32,9 +32,7 @@ export default function Edit(props: BlockEditProps) { return ( <> {gateways.some((gateway) => gateway.id === 'stripe_payment_element' && gateway.enabled) && - attributes.stripeAccounts && ( - - )} + attributes.stripeAccounts && }
{ setAttributes({ stripeAccounts: { ...stripeAccounts, - ...newAttributes - } + ...newAttributes, + }, }); }; @@ -28,6 +31,22 @@ export default function StripeAccounts({attributes, setAttributes, gateways}) { checked={stripeAccounts.useGlobalDefault} onChange={(value) => handleSetAttributes({useGlobalDefault: value})} /> + {!MOCK.default && ( + +

{__('No default account set', 'give')}

+

{__('All donations are processed through the default Stripe account.', 'give')}

+
+ )} ); diff --git a/src/FormBuilder/resources/js/form-builder/src/styles/_components.scss b/src/FormBuilder/resources/js/form-builder/src/styles/_components.scss index f6a95fa4d5..28a587c9ec 100644 --- a/src/FormBuilder/resources/js/form-builder/src/styles/_components.scss +++ b/src/FormBuilder/resources/js/form-builder/src/styles/_components.scss @@ -155,6 +155,29 @@ This creates a consistent separator between the tabs and the rest of the sidebar padding-right: 16px; } +.components-panel__body .components-notice { + color: var(--givewp-grey-700); + font-size: 0.75rem; + line-height: 1rem; + margin-left: 0; + margin-right: 0; + padding: var(--givewp-spacing-3) var(--givewp-spacing-4); + + .components-notice__content { + margin: 0; + } + + h4 { + color: var(--givewp-grey-900); + margin: 0 0 var(--givewp-spacing-2); + } + + .components-notice__action.is-link { + color: var(--givewp-grey-900); + margin-left: 0; + } +} + .givewp-donation-level-control .components-base-control, .givewp-donation-level-control .components-base-control__field { margin-bottom: 0;