woocommerce/plugins/woocommerce-admin/docs/components
Albert Juhé Lluveras 17e9f151be Create ViewMoreList component (https://github.com/woocommerce/woocommerce-admin/pull/503)
* Create ViewMoreList component

* Update Tag component with the new style and popover

* Display number of times an item was bought in the Orders table (2x, 1x, ...)

* Refactor ViewMoreList so the elements to display in the list and the popover are different props

* Cleanup

* Fix CSV values for products and coupons

* Minor fixes

* Rename ViewMoreList prop from 'popoverItems' to 'items'

* Cleanup props

* Add ViewMoreList to devdocs examples

* Order Tag props alphabetically

* Move withState to export line so it doesn't break docs generation

* Rename 'is-not-unique' class name to 'is-inline'

* Fix missing comma

* Remove margin from popover list

* Use pseudo-selector to replace 'is-inline' class in cell links
2018-10-12 23:29:25 +02:00
..
README.md Documentation: Move topic READMEs into docs for discoverability (https://github.com/woocommerce/woocommerce-admin/pull/469) 2018-09-24 11:22:14 -04:00
_sidebar.md Documentation: Move topic READMEs into docs for discoverability (https://github.com/woocommerce/woocommerce-admin/pull/469) 2018-09-24 11:22:14 -04:00
animation-slider.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
calendar.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
card.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
chart.md Search: Add inline tags 2018-10-12 11:34:08 +13:00
count.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
dropdown-button.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
ellipsis-menu.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
empty-content.md Build: Update packages (https://github.com/woocommerce/woocommerce-admin/pull/434) 2018-09-18 17:37:57 -04:00
filters.md Search: Add inline tags 2018-10-12 11:34:08 +13:00
flag.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
gravatar.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
image-asset.md Build: Update packages (https://github.com/woocommerce/woocommerce-admin/pull/434) 2018-09-18 17:37:57 -04:00
link.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
order-status.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
pagination.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
product-image.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
rating.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
search.md Search: Add inline tags 2018-10-12 11:34:08 +13:00
section.md Update `layout/*` file structure (https://github.com/woocommerce/woocommerce-admin/pull/463) 2018-09-21 11:19:05 -04:00
segmented-selection.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
split-button.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
summary.md Build: Update packages (https://github.com/woocommerce/woocommerce-admin/pull/434) 2018-09-18 17:37:57 -04:00
table.md Search: Add inline tags 2018-10-12 11:34:08 +13:00
tag.md Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337) 2018-08-31 16:13:20 -04:00
view-more-list.md Create ViewMoreList component (https://github.com/woocommerce/woocommerce-admin/pull/503) 2018-10-12 23:29: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>
  );
}