woocommerce/plugins/woocommerce-admin/client/components
David Levin c06c3b0cef Merge pull request woocommerce/woocommerce-admin#318 from woocommerce/update/datepicker-styles-updates
Updates to presets / custom toggle and segmented selection
2018-08-23 12:15:59 -07:00
..
animation-slider Animation mixin + add `prefers-reduced-motion` support to existing animations (https://github.com/woocommerce/woocommerce-admin/pull/317) 2018-08-23 13:47:27 -04: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 Animation mixin + add `prefers-reduced-motion` support to existing animations (https://github.com/woocommerce/woocommerce-admin/pull/317) 2018-08-23 13:47:27 -04: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 style updates per review 2018-08-23 11:21:04 -07: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 style updates per review 2018-08-23 11:21:04 -07:00
split-button Add Collapsed Review View (https://github.com/woocommerce/woocommerce-admin/pull/242) 2018-08-01 08:21:51 -04:00
summary Animation mixin + add `prefers-reduced-motion` support to existing animations (https://github.com/woocommerce/woocommerce-admin/pull/317) 2018-08-23 13:47:27 -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>
  );
}