woocommerce/plugins/woocommerce-admin/client/components
Kelly Dwan 4b30e78ae6 Filters: Remove `filterpaths` props (https://github.com/woocommerce/woocommerce-admin/pull/315)
* Filters: Remove filterPaths, add path as property to filters object

* Set a default path, so we only need to configure it for changed paths

* Fix nav & filter fetching for nested lists

* Add “go back” functionality to all subfilter lists, not only ones with components set

* Make label optional on component options

* Update documentation to remove mention of filterpaths

* Add documentation on the filters structure
2018-08-22 16:20:19 -04:00
..
animation-slider FilterPicker: Add Animation 2018-07-20 15:42:36 +12:00
calendar SummaryNumber: Switch to dropdown display on small screens (https://github.com/woocommerce/woocommerce-admin/pull/265) 2018-08-02 18:20:48 -04:00
card 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
chart 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
count 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
dropdown-button Add transition to chevron 2018-08-22 07:50:10 -07:00
ellipsis-menu Update to Gutenberg 3.3 (https://github.com/woocommerce/woocommerce-admin/pull/234) 2018-07-23 16:14:40 -04:00
filters Filters: Remove `filterpaths` props (https://github.com/woocommerce/woocommerce-admin/pull/315) 2018-08-22 16:20:19 -04:00
flag Add Flag Component (https://github.com/woocommerce/woocommerce-admin/pull/197) 2018-07-16 12:28:26 -04:00
gravatar Add Activity Panel Outbound Link Component (https://github.com/woocommerce/woocommerce-admin/pull/213) 2018-07-17 14:51:56 -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
link Add Activity Panel Outbound Link Component (https://github.com/woocommerce/woocommerce-admin/pull/213) 2018-07-17 14:51:56 -04:00
order-status Add Order Status Component (https://github.com/woocommerce/woocommerce-admin/pull/214) 2018-07-17 09:11:13 -04:00
pagination Verify the page number exists. 2018-08-01 11:51:11 -07:00
product-image Add ProductImage Component (https://github.com/woocommerce/woocommerce-admin/pull/231) 2018-07-20 14:24:39 -04:00
rating 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
segmented-selection init for legends PR 2018-07-25 17:04:03 +02:00
split-button Add Collapsed Review View (https://github.com/woocommerce/woocommerce-admin/pull/242) 2018-08-01 08:21:51 -04:00
summary Fix the summaryNumber display when in toggle-button state (https://github.com/woocommerce/woocommerce-admin/pull/313) 2018-08-22 14:08:48 -04:00
table Apply scope only to the row headers (https://github.com/woocommerce/woocommerce-admin/pull/300) 2018-08-16 10:37:10 -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 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

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>
  );
}