mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
✨ React-side implementation of the save logic
This commit is contained in:
parent
5c371d928e
commit
e00b95fd1d
1 changed files with 13 additions and 1 deletions
|
@ -2,13 +2,25 @@ import { Button } from '@wordpress/components';
|
|||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
import TopNavigation from '../../../ReusableComponents/TopNavigation';
|
||||
import { StylingHooks } from '../../../../data';
|
||||
|
||||
const SettingsNavigation = () => {
|
||||
const { persist: persistStyling } = StylingHooks.useStore();
|
||||
const isBusy = false; // TODO: Implement loading state.
|
||||
|
||||
const handleSaveClick = () => {
|
||||
persistStyling();
|
||||
};
|
||||
|
||||
const title = __( 'PayPal Payments', 'woocommerce-paypal-payments' );
|
||||
|
||||
return (
|
||||
<TopNavigation title={ title } exitOnTitleClick={ true }>
|
||||
<Button variant="primary" disabled={ false }>
|
||||
<Button
|
||||
variant="primary"
|
||||
disabled={ isBusy }
|
||||
onClick={ handleSaveClick }
|
||||
>
|
||||
{ __( 'Save', 'woocommerce-paypal-payments' ) }
|
||||
</Button>
|
||||
</TopNavigation>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue