mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
23 lines
677 B
JavaScript
23 lines
677 B
JavaScript
import { Button } from '@wordpress/components';
|
|
import { __ } from '@wordpress/i18n';
|
|
|
|
import TopNavigation from '../../../ReusableComponents/TopNavigation';
|
|
import { useSaveSettings } from '../../../../hooks/useSaveSettings';
|
|
|
|
const SettingsNavigation = ( { canSave = true } ) => {
|
|
const { persistAll } = useSaveSettings();
|
|
|
|
const title = __( 'PayPal Payments', 'woocommerce-paypal-payments' );
|
|
|
|
return (
|
|
<TopNavigation title={ title } exitOnTitleClick={ true }>
|
|
{ canSave && (
|
|
<Button variant="primary" onClick={ persistAll }>
|
|
{ __( 'Save', 'woocommerce-paypal-payments' ) }
|
|
</Button>
|
|
) }
|
|
</TopNavigation>
|
|
);
|
|
};
|
|
|
|
export default SettingsNavigation;
|