d728d38219
* integrate with new asset data registration (php side) - includes back-compatibility. * update js configuration and implement settings alias - this aliases `@woocommerce/wc-admin-settings` to the settings api exposed via blocks (either the blocks plugin or core) and all the settings provided via the server. - Adds fallback for back-compat if `wc.wcSettings` is not available in the environment (fallsback to `wcSettings`). * initial pass to update all wcSettings direct usage to the new api - this is just an initial pass, more can be done in separate pulls. * missed one spot for adding new filter implementation * fix incorrect jest config * Avoid unnecessary assignment and directly return. * Remove unnecessary defaults * Fix inline comment text case. Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com> * Remove unnecessary inline comment. * use @todo instead of TODO Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com> * fix incorrect reference in webpack config. * add missing import and slightly delay dependency injection for scripts * update get-setting and set-setting callbacks * disable lint rule for console.error on dev doc builds |
||
---|---|---|
.. | ||
activity-panel | ||
README.md | ||
index.js | ||
style.scss |
README.md
Header
A basic component for the app header. The header outputs breadcrumbs via the sections
prop (required) and access to the activity panel. It also sets the document title.
How to use:
import Header from 'header';
render: function() {
return (
<Header
sections={ [
[ '/analytics', __( 'Analytics', 'woocommerce-admin' ) ],
__( 'Report Title', 'woocommerce-admin' ),
] }
/>
);
}
Props
sections
(required): Used to generate breadcrumbs. Accepts a single items or an array of items. To make an item a link, wrap it in an array with a relative link (example:[ '/analytics', __( 'Analytics', 'woocommerce-admin' ) ]
).isEmbedded
: Boolean describing if the header is embedded on an existing wp-admin page. False if rendered as part of a full react page.
Activity Panel
This component contains the Activity Panel. This is shown on every page and is rendered as part of the header.