mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
💄 Improve UI if the Disconnect-modal
This commit is contained in:
parent
0a98fcb8cc
commit
921546953e
3 changed files with 17 additions and 3 deletions
|
@ -4,7 +4,6 @@ import { useCallback, useState } from '@wordpress/element';
|
|||
|
||||
import { CommonHooks } from '../../../../../../data';
|
||||
import { HStack } from '../../../../../ReusableComponents/Stack';
|
||||
import { Separator } from '../../../../../ReusableComponents/Elements';
|
||||
|
||||
const DisconnectButton = () => {
|
||||
const [ isOpen, setIsOpen ] = useState( false );
|
||||
|
@ -41,6 +40,7 @@ const DisconnectButton = () => {
|
|||
|
||||
{ isOpen && (
|
||||
<Modal
|
||||
className="ppcp--modal-disconnect"
|
||||
size="small"
|
||||
title={ confirmationTitle }
|
||||
onRequestClose={ handleCancel }
|
||||
|
@ -53,6 +53,7 @@ const DisconnectButton = () => {
|
|||
</p>
|
||||
<ToggleControl
|
||||
__nextHasNoMarginBottom
|
||||
className="ppcp--toggle-danger"
|
||||
checked={ resetFlag }
|
||||
onChange={ setResetFlag }
|
||||
label={ __(
|
||||
|
@ -66,12 +67,11 @@ const DisconnectButton = () => {
|
|||
'woocommerce-paypal-payments'
|
||||
)
|
||||
: __(
|
||||
'Change Paypal accounts, preserving all settings',
|
||||
'Disconnect, but preserve all settings',
|
||||
'woocommerce-paypal-payments'
|
||||
)
|
||||
}
|
||||
/>
|
||||
<Separator />
|
||||
<HStack className="ppcp--action-buttons">
|
||||
<Button variant="tertiary" onClick={ handleCancel }>
|
||||
{ __( 'Cancel', 'woocommerce-paypal-payments' ) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue