woocommerce/plugins/woocommerce-admin/client/components
David Levin 4ee6becb6d Merge pull request woocommerce/woocommerce-admin#335 from woocommerce/update/mobile-card-styles
Update Card Component Styles on Mobile
2018-08-31 07:55:35 -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 Merge pull request woocommerce/woocommerce-admin#332 from woocommerce/update/319-datepicker-design-details 2018-08-30 16:33:07 -07:00
card update mobile card styles 2018-08-30 16:02:12 -07: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 Merge pull request woocommerce/woocommerce-admin#332 from woocommerce/update/319-datepicker-design-details 2018-08-30 16:33:07 -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
search Components: Add a search component based on Autocomplete (https://github.com/woocommerce/woocommerce-admin/pull/322) 2018-08-28 15:15:24 -04:00
segmented-selection Segmented-selection: remove focus outline in favor of inset box-shadow 2018-08-30 08:21:59 +12: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 Create TablePlaceholder component to be used when table contents are loading (https://github.com/woocommerce/woocommerce-admin/pull/338) 2018-08-31 16:43:25 +02:00
tag Components: Add a search component based on Autocomplete (https://github.com/woocommerce/woocommerce-admin/pull/322) 2018-08-28 15:15:24 -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 Create TablePlaceholder component to be used when table contents are loading (https://github.com/woocommerce/woocommerce-admin/pull/338) 2018-08-31 16:43:25 +02: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>
  );
}