woocommerce/plugins/woocommerce-admin/client/layout/header
Timmy Crawford 7639f61c2e Add site title to wcSettings 2018-08-01 12:19:25 -07: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 Add site title to wcSettings 2018-08-01 12:19:25 -07: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.