mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
♻️ Sample implementation of seller-type in JS
This commit is contained in:
parent
b387fff9ef
commit
988d221a98
2 changed files with 8 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import SettingsCard from '../../../../ReusableComponents/SettingsCard';
|
||||
import { CommonHooks } from '../../../../../data';
|
||||
|
@ -8,11 +9,15 @@ import SettingsBlock from '../../../../ReusableComponents/SettingsBlock';
|
|||
import { ControlStaticValue } from '../../../../ReusableComponents/Controls';
|
||||
|
||||
const ConnectionStatus = () => {
|
||||
const { merchant } = CommonHooks.useMerchantInfo();
|
||||
const merchant = CommonHooks.useMerchant();
|
||||
const className = classNames( 'ppcp-connection-details ppcp--value-list', {
|
||||
'ppcp--type-business': merchant.isBusinessSeller,
|
||||
'ppcp--type-casual': merchant.isCasualSeller,
|
||||
} );
|
||||
|
||||
return (
|
||||
<SettingsCard
|
||||
className="ppcp-connection-details ppcp--value-list"
|
||||
className={ className }
|
||||
title={ __( 'Connection status', 'woocommerce-paypal-payments' ) }
|
||||
description={ <ConnectionDescription /> }
|
||||
>
|
||||
|
|
|
@ -5,6 +5,7 @@ import { getSettingsTabs } from './Tabs';
|
|||
const SettingsScreen = ( { activePanel, setActivePanel } ) => {
|
||||
const tabs = getSettingsTabs();
|
||||
const { Component } = tabs.find( ( tab ) => tab.name === activePanel );
|
||||
|
||||
return (
|
||||
<>
|
||||
<SettingsNavigation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue