woocommerce/plugins/woocommerce-admin/client/header
Jeff Stieler b83ef86add Merge pull request woocommerce/woocommerce-admin#2325 from woocommerce/add/admin-note-trigger-action
Trigger an action server side when admin note actions are clicked
2019-06-12 17:04:10 +02:00
..
activity-panel Merge pull request woocommerce/woocommerce-admin#2325 from woocommerce/add/admin-note-trigger-action 2019-06-12 17:04:10 +02:00
README.md Update text domain. (https://github.com/woocommerce/woocommerce-admin/pull/1795) 2019-03-13 11:14:02 -06:00
index.js WC_Admin_Loader/PHP Refactor + Method to publish core ready features (https://github.com/woocommerce/woocommerce-admin/pull/1863) 2019-04-11 14:31:31 -04:00
style.scss Scroll to top of the table when navigating table pages (https://github.com/woocommerce/woocommerce-admin/pull/2051) 2019-04-30 11:43:55 +02: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. The Header component used in each section automatically fills into the "header" slot defined in <Layout />. We're using react-slot-fill to avoid a duplicated div wrapper from Gutenberg's implementation.

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.