React-side implementation of the save logic

This commit is contained in:
Philipp Stracker 2025-01-17 16:24:49 +01:00
parent 5c371d928e
commit e00b95fd1d
No known key found for this signature in database

View file

@ -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>