This commit is contained in:
carmenmaymo 2025-01-28 13:55:43 +01:00
parent ede2cb51b3
commit 2f99866267
No known key found for this signature in database
GPG key ID: 6023F686B0F3102E

View file

@ -4,17 +4,24 @@ import { __ } from '@wordpress/i18n';
import TopNavigation from '../../../ReusableComponents/TopNavigation'; import TopNavigation from '../../../ReusableComponents/TopNavigation';
import { useSaveSettings } from '../../../../hooks/useSaveSettings'; import { useSaveSettings } from '../../../../hooks/useSaveSettings';
const SettingsNavigation = ( { canSave = true, tabs, activePanel, setActivePanel } ) => { const SettingsNavigation = ( {
canSave = true,
tabs,
activePanel,
setActivePanel,
} ) => {
const { persistAll } = useSaveSettings(); const { persistAll } = useSaveSettings();
const title = __( 'PayPal Payments', 'woocommerce-paypal-payments' ); const title = __( 'PayPal Payments', 'woocommerce-paypal-payments' );
return ( return (
<TopNavigation title={ title } exitOnTitleClick={ true } <TopNavigation
tabs={ tabs } title={ title }
activePanel={ activePanel } exitOnTitleClick={ true }
setActivePanel={ setActivePanel } tabs={ tabs }
> activePanel={ activePanel }
setActivePanel={ setActivePanel }
>
{ canSave && ( { canSave && (
<Button variant="primary" onClick={ persistAll }> <Button variant="primary" onClick={ persistAll }>
{ __( 'Save', 'woocommerce-paypal-payments' ) } { __( 'Save', 'woocommerce-paypal-payments' ) }