c05605fddf
* Update husky from 4 to 7 * Update @types/jest from 26 to 27 * Update lint-staged from 10 to 12 * Update babel-jest from 26 to 27 * Update @typescript-eslint/eslint-plugin from 4 to 5 * Update @typescript-eslint/parser from 4 to 5 * Update chalk from 4 to 5 * Update concurrently from 5 to 7 * Update stylelint from 9 to 14 and stylelint-config-wordpress from 13 to 17 * Update @wordpress/prettier-config from 0.4 to 1.1 * Update eslint from 7 to 8, @wordpress/eslint-plugin from 8 to 10, eslint-plugin-testing-library to 5 * Fix lint errors after updating eslint-plugin-testing-library * Fix style lint * Rename .stylelintrc.json -> stylelint.config.js & add todo comment Fix stylelint.config.js * Remove @wordpress/e2e-test-utils * Add changelogs for eslint-plugin * Update storybook/preview.js since addDecorator has been deprecated Remove parameters * Import directly from @storybook/addon-docs * Migrate some stories to use @storybook/addon-controls Add a comment for @storybook/addon-knobs * Update changelogs * Update preview.js to fix lint warning * Update pnpm-lock.yaml * Fix eslint layout errors (https://github.com/woocommerce/woocommerce-admin/pull/8484) |
||
---|---|---|
.. | ||
test | ||
README.md | ||
index.js | ||
style.scss | ||
utils.js |
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 '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.