dec97d178e
* Importing all components from a root components file * Update Ratings component to avoid circular dependencies, fix tests * Export components on `wc.components`, use this for importing * Move react-dates initialize to the components file * Push query changes to history Fixes an issues where native a links do not update the query in `history` * Update test config for new @woocommerce/components path * Update chart components import * Merge simple/complex & alphabetize by first exported name * Add a readme with info about how to call these components |
||
---|---|---|
.. | ||
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 'layout/header';
render: function() {
return (
<Header
sections={ [
[ '/analytics', __( 'Analytics', 'wc-admin' ) ],
__( 'Report Title', 'wc-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', 'wc-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.