woocommerce/plugins/woocommerce-admin/packages/components
Sam Seay 9033d575cc Remove stylesheets supporting IE11 (https://github.com/woocommerce/woocommerce-admin/pull/7137)
* Remove stylesheets supporting IE11.

* Add a changelog entry.
2021-06-09 09:11:18 -03:00
..
src Remove stylesheets supporting IE11 (https://github.com/woocommerce/woocommerce-admin/pull/7137) 2021-06-09 09:11:18 -03:00
.npmrc Build: Move components to packages dir (https://github.com/woocommerce/woocommerce-admin/pull/804) 2018-11-15 13:16:23 -05:00
CHANGELOG.md Deprecate the no longer used Gravatar component (https://github.com/woocommerce/woocommerce-admin/pull/7116) 2021-06-04 10:08:45 +12:00
README.md Remove the deprecated Card component (https://github.com/woocommerce/woocommerce-admin/pull/7114) 2021-06-04 07:43:56 +12:00
package.json Pin dependencies 2021-06-09 02:57:00 +00:00

README.md

Components

This packages includes a library of components that can be used to create pages in the WooCommerce dashboard and reports pages.

Installation

Install the module

npm install @woocommerce/components --save

View the full Component documentation for usage information.

Usage

/**
 * Woocommerce dependencies
 */
import { Badge } from '@woocommerce/components';

export default function MyBadge() {
	return <Badge count={ 15 } />;
}

Many components include CSS to add style, you will need to add in order to appear correctly. Within WooCommerce, add the wc-components stylesheet as a dependency of your plugin's stylesheet. See wp_enqueue_style documentation for how to specify dependencies.

In non-WordPress projects, link to the build-style/card/style.css file directly, it is located at node_modules/@woocommerce/components/build-style/<component_name>/style.css.