woocommerce/plugins/woocommerce-admin/client/components
Kelly Dwan f2e0165d5f Component – Table: Add compare checkboxes (https://github.com/woocommerce/woocommerce-admin/pull/389)
* Switch to withInstanceId higher order component

* Add checkboxes to the rows in a TableCard, if a compareBy prop is set

* Add Compare button to update query param

* Populate the selected rows from the query parameter

* Update compare filter display & selected table rows when the query changes

* Skip displaying tags if the label is null/undefined

* Style table header with compare button, search placeholder

* Prevent setting just an ID list as the state, as this will wipe out already-fetched tag labels

* Update docs

* Shortcut out of fetching tag labels if the query is empty
2018-09-18 10:12:13 -04:00
..
animation-slider Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
calendar IE11: fix dates overlapping in Custom filter (https://github.com/woocommerce/woocommerce-admin/pull/411) 2018-09-14 17:35:04 +02:00
card Component – Table: Add compare checkboxes (https://github.com/woocommerce/woocommerce-admin/pull/389) 2018-09-18 10:12:13 -04:00
chart remove he package and rename uniqueDates to ticks 2018-09-17 11:07:11 +02:00
count Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
dropdown-button Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
ellipsis-menu Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
empty-content Add loading indicators, error state, and EmptyContent to the revenue report. (#347, woocommerce/woocommerce-admin#348) 2018-09-05 12:45:49 -04:00
filters Component – Table: Add compare checkboxes (https://github.com/woocommerce/woocommerce-admin/pull/389) 2018-09-18 10:12:13 -04:00
flag Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
gravatar Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
higher-order/use-filters 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
image-asset Add loading indicators, error state, and EmptyContent to the revenue report. (#347, woocommerce/woocommerce-admin#348) 2018-09-05 12:45:49 -04:00
link Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
order-status Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
pagination Connect the revenue report to the api (https://github.com/woocommerce/woocommerce-admin/pull/316) 2018-09-03 11:25:38 -04:00
product-image Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
rating Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
search Search: move selected from state to props 2018-09-11 16:18:10 +12:00
segmented-selection Fix Date filters grid not displaying correctly in IE11 (https://github.com/woocommerce/woocommerce-admin/pull/366) 2018-09-07 11:43:52 +02:00
split-button Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
summary IE11: fix CSS grid in Summary (https://github.com/woocommerce/woocommerce-admin/pull/353) 2018-09-06 17:11:34 +02:00
table Component – Table: Add compare checkboxes (https://github.com/woocommerce/woocommerce-admin/pull/389) 2018-09-18 10:12:13 -04:00
tag Component – Table: Add compare checkboxes (https://github.com/woocommerce/woocommerce-admin/pull/389) 2018-09-18 10:12:13 -04:00
README.md Components: Export reusable components to a separate file + global (https://github.com/woocommerce/woocommerce-admin/pull/297) 2018-08-20 17:18:13 -04:00
index.js Add loading indicators, error state, and EmptyContent to the revenue report. (#347, woocommerce/woocommerce-admin#348) 2018-09-05 12:45:49 -04:00

README.md

Components

This folder contains the WooCommerce-created components. These are exported onto a global, wc.components, for general use.

How to use:

For any files not imported into components/index.js (analytics/*, layout/*, dashboard/*, etc), we can use import { Card, etc … } from @woocommerce/components.

For any component/* files, we should import from component-specific paths, not from component/index.js, to prevent circular dependencies. See components/card/index.js for an example.

import { Card, Link } from '@woocommerce/components';

render: function() {
  return (
    <Card title="Card demo">
      Card content with an <Link href="/">example link.</Link>
    </Card>
  );
}

For external development

External developers will need to enqueue the components library, wc-components, and then can access them from the global.

const { Card, Link } = wc.components;

render: function() {
  return (
    <Card title="Card demo">
      Card content with an <Link href="/">example link.</Link>
    </Card>
  );
}