17e9f151be
* 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 |
||
---|---|---|
.. | ||
README.md | ||
_sidebar.md | ||
animation-slider.md | ||
calendar.md | ||
card.md | ||
chart.md | ||
count.md | ||
dropdown-button.md | ||
ellipsis-menu.md | ||
empty-content.md | ||
filters.md | ||
flag.md | ||
gravatar.md | ||
image-asset.md | ||
link.md | ||
order-status.md | ||
pagination.md | ||
product-image.md | ||
rating.md | ||
search.md | ||
section.md | ||
segmented-selection.md | ||
split-button.md | ||
summary.md | ||
table.md | ||
tag.md | ||
view-more-list.md |
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>
);
}