Renaming App to app, and including prettier deps
This commit is contained in:
parent
a320be734e
commit
322dc12755
|
@ -22,7 +22,9 @@
|
|||
"devDependencies": {
|
||||
"@woocommerce/dependency-extraction-webpack-plugin": "1.4.0",
|
||||
"@woocommerce/eslint-plugin": "1.1.0",
|
||||
"@wordpress/scripts": "^13.0.3"
|
||||
"@wordpress/prettier-config": "^1.0.1",
|
||||
"@wordpress/scripts": "^13.0.3",
|
||||
"prettier": "^2.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@woocommerce/data": "^1.1.1",
|
||||
|
|
|
@ -11,26 +11,23 @@ import { AdminNotes } from '../admin-notes';
|
|||
import { Tools } from '../tools';
|
||||
import { default as Options } from '../options';
|
||||
|
||||
const tabs = applyFilters(
|
||||
'woocommerce_admin_test_helper_tabs',
|
||||
[
|
||||
{
|
||||
name: 'options',
|
||||
title: 'Options',
|
||||
content: <Options/>,
|
||||
},
|
||||
{
|
||||
name: 'admin-notes',
|
||||
title: 'Admin notes',
|
||||
content: <AdminNotes/>,
|
||||
},
|
||||
{
|
||||
name: 'tools',
|
||||
title: 'Tools',
|
||||
content: <Tools/>,
|
||||
},
|
||||
]
|
||||
);
|
||||
const tabs = applyFilters('woocommerce_admin_test_helper_tabs', [
|
||||
{
|
||||
name: 'options',
|
||||
title: 'Options',
|
||||
content: <Options />,
|
||||
},
|
||||
{
|
||||
name: 'admin-notes',
|
||||
title: 'Admin notes',
|
||||
content: <AdminNotes />,
|
||||
},
|
||||
{
|
||||
name: 'tools',
|
||||
title: 'Tools',
|
||||
content: <Tools />,
|
||||
},
|
||||
]);
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
|
@ -39,18 +36,18 @@ export function App() {
|
|||
<TabPanel
|
||||
className="woocommerce-admin-test-helper__main-tab-panel"
|
||||
activeClass="active-tab"
|
||||
tabs={ tabs }
|
||||
initialTabName={ tabs[ 0 ].name }
|
||||
tabs={tabs}
|
||||
initialTabName={tabs[0].name}
|
||||
>
|
||||
{ ( tab ) => (
|
||||
{(tab) => (
|
||||
<>
|
||||
{ tab.content }
|
||||
{ applyFilters(
|
||||
`woocommerce_admin_test_helper_tab_${ tab.name }`,
|
||||
{tab.content}
|
||||
{applyFilters(
|
||||
`woocommerce_admin_test_helper_tab_${tab.name}`,
|
||||
[]
|
||||
) }
|
||||
)}
|
||||
</>
|
||||
) }
|
||||
)}
|
||||
</TabPanel>
|
||||
</div>
|
||||
);
|
|
@ -6,7 +6,7 @@ import { render } from '@wordpress/element';
|
|||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { App } from './App';
|
||||
import { App } from './app';
|
||||
import './index.scss';
|
||||
|
||||
const appRoot = document.getElementById(
|
||||
|
|
Loading…
Reference in New Issue