woocommerce/plugins/woocommerce-admin/client/layout/header
Kelly Dwan 944b7ab460 Update to Gutenberg 3.3 (https://github.com/woocommerce/woocommerce-admin/pull/234)
Removes Gutenberg package dependency in favor of published sub-packages, update tests and build process to reflect new package locations
2018-07-23 16:14:40 -04:00
..
README.md Update woo-dash naming to new wc-admin name (https://github.com/woocommerce/woocommerce-admin/pull/183) 2018-07-10 08:48:06 -04:00
index.js Update to Gutenberg 3.3 (https://github.com/woocommerce/woocommerce-admin/pull/234) 2018-07-23 16:14:40 -04:00
style.scss Fixes some display issues on embedded/classic WC pages (https://github.com/woocommerce/woocommerce-admin/pull/186) 2018-07-13 15:19:54 -04:00

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.