woocommerce/plugins/woocommerce-admin/client/components/card
Kelly Dwan 99ac7728cd Try a context-aware heading component (https://github.com/woocommerce/woocommerce-admin/pull/121)
* Add H and Section components for context-aware headings

* Switch to using the new context-aware heading and section components

* Style header by class name, not heading level

* Add our client dir to the modules list for Jest

We already have this setting in webpack, but Jest doesn’t pick up on that
2018-06-20 11:10:06 -04:00
..
test Add CSS naming conventions following Gutenberg’s standards (https://github.com/woocommerce/woocommerce-admin/pull/99) 2018-06-01 10:35:18 -04:00
README.md Rename js/src to client (https://github.com/woocommerce/woocommerce-admin/pull/38) 2018-05-11 12:13:57 -04:00
index.js Try a context-aware heading component (https://github.com/woocommerce/woocommerce-admin/pull/121) 2018-06-20 11:10:06 -04:00
style.scss Add CSS naming conventions following Gutenberg’s standards (https://github.com/woocommerce/woocommerce-admin/pull/99) 2018-06-01 10:35:18 -04:00

README.md

Card

A basic card component with a header. The header can contain a title (required), an action (optional), and an EllipsisMenu menu (optional).

How to use:

import Card from 'components/card';

render: function() {
  return (
    <Card title={ "Store Performance" }>
      <p>Your stuff in a Card</p>
    </Card>
  );
}

Props

  • title (required): The title to use for this card.
  • action: One "primary" action for this card, appears in the card header
  • className: You can add classes to the card container.
  • menu: An EllipsisMenu, with filters used to control the content visible in this card