mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Use highlight for payment methods
This commit is contained in:
parent
17702ff06b
commit
36bf0d9e7f
2 changed files with 28 additions and 19 deletions
|
@ -26,7 +26,10 @@ import {
|
|||
import SpinnerOverlay from '../../../ReusableComponents/SpinnerOverlay';
|
||||
import { useFeatures } from '../../../../data/features/hooks';
|
||||
import { selectTab, TAB_IDS } from '../../../../utils/tabSelector';
|
||||
import { setActiveModal } from '../../../../data/common/actions';
|
||||
import {
|
||||
setActiveHighlight,
|
||||
setActiveModal,
|
||||
} from '../../../../data/common/actions';
|
||||
|
||||
const TabOverview = () => {
|
||||
const { isReady: areTodosReady } = TodosHooks.useStore();
|
||||
|
@ -231,6 +234,9 @@ const OverviewFeatureItem = ( {
|
|||
if ( feature.action?.modal ) {
|
||||
setActiveModal( feature.action.modal );
|
||||
}
|
||||
if ( feature.action?.highlight ) {
|
||||
setActiveHighlight( feature.action.highlight );
|
||||
}
|
||||
};
|
||||
|
||||
const actionProps = {
|
||||
|
|
|
@ -78,9 +78,8 @@ class FeaturesDefinition {
|
|||
'type' => 'secondary',
|
||||
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
||||
'action' => array(
|
||||
'type' => 'tab',
|
||||
'tab' => 'settings',
|
||||
'section' => 'ppcp--save-payment-methods',
|
||||
'type' => 'tab',
|
||||
'tab' => 'settings',
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
'class' => 'small-button',
|
||||
|
@ -112,10 +111,11 @@ class FeaturesDefinition {
|
|||
'type' => 'secondary',
|
||||
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
||||
'action' => array(
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-card-payments-card',
|
||||
'modal' => 'ppcp-credit-card-gateway',
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-credit-card-gateway',
|
||||
'highlight' => 'ppcp-credit-card-gateway',
|
||||
'modal' => 'ppcp-credit-card-gateway',
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
'class' => 'small-button',
|
||||
|
@ -147,9 +147,10 @@ class FeaturesDefinition {
|
|||
'type' => 'secondary',
|
||||
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
||||
'action' => array(
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-alternative-payments-card',
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-alternative-payments-card',
|
||||
'highlight' => 'ppcp-alternative-payments-card',
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
'class' => 'small-button',
|
||||
|
@ -178,10 +179,11 @@ class FeaturesDefinition {
|
|||
'type' => 'secondary',
|
||||
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
||||
'action' => array(
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-card-payments-card',
|
||||
'modal' => 'ppcp-googlepay',
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-card-payments-card',
|
||||
'highlight' => 'ppcp-googlepay',
|
||||
'modal' => 'ppcp-googlepay',
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
'class' => 'small-button',
|
||||
|
@ -216,10 +218,11 @@ class FeaturesDefinition {
|
|||
'type' => 'secondary',
|
||||
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
||||
'action' => array(
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-card-payments-card',
|
||||
'modal' => 'ppcp-applepay',
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-card-payments-card',
|
||||
'highlight' => 'ppcp-applepay',
|
||||
'modal' => 'ppcp-applepay',
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
'class' => 'small-button',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue