woocommerce/plugins/woocommerce-admin/client/layout/header
Justin Shreve 9f1015b155 Implement updated activity panel tab design (https://github.com/woocommerce/woocommerce-admin/pull/137) 2018-06-29 11:20:08 -04:00
..
README.md Rename sidebar to activity-panel, and refactor code and behavior. 2018-06-28 09:52:45 -04:00
index.js Implement updated activity panel tab design (https://github.com/woocommerce/woocommerce-admin/pull/137) 2018-06-29 11:20:08 -04:00
style.scss Implement updated activity panel tab design (https://github.com/woocommerce/woocommerce-admin/pull/137) 2018-06-29 11:20:08 -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', 'woo-dash' ) ],
				__( 'Report Title', 'woo-dash' ),
			] }
		/>
  	);
}

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', 'woo-dash' ) ] ).
  • isEmbedded: Boolean describing if the header is embedded on an existing wp-admin page. False if rendered as part of a full react page.