woocommerce/plugins/woocommerce-admin/client/layout/activity-panel/activity-card
Kelly Dwan 9fca535c67 Update ActivityCard to latest hifi designs (https://github.com/woocommerce/woocommerce-admin/pull/203)
* ActivityCard: Update to match new activity panel designs

* Add spacing rhythm system, add the rest of the base colors

* Add styles for the ActivityCard

* Use the new ActivityCard in the orders panel

* Update text color & size

* Disable timestamped test (string changes based on date)

* Use moment to generate a relative timestamp to match “3 days ago” snapshot

* Rename spacing vars

The difference between gap and gap-med is not intuitive, so let’s switch to -small, and change -small to -smallest.
2018-07-16 09:53:38 -04:00
..
test Update ActivityCard to latest hifi designs (https://github.com/woocommerce/woocommerce-admin/pull/203) 2018-07-16 09:53:38 -04:00
README.md Update ActivityCard to latest hifi designs (https://github.com/woocommerce/woocommerce-admin/pull/203) 2018-07-16 09:53:38 -04:00
index.js Update ActivityCard to latest hifi designs (https://github.com/woocommerce/woocommerce-admin/pull/203) 2018-07-16 09:53:38 -04:00
style.scss Update ActivityCard to latest hifi designs (https://github.com/woocommerce/woocommerce-admin/pull/203) 2018-07-16 09:53:38 -04:00

README.md

ActivityCard

A card designed for use in the activity panel. This is a very structured component, which expects at minimum a label and content. It can optionally also include a date, actions, an image, and a dropdown menu.

How to use:

import ActivityCard from 'components/activity-card';

render: function() {
  return (
    <ActivityCard
      title="Insight"
      icon={ <Gridicon icon="search" /> }
      date="2018-07-10T00:00:00Z"
      actions={ [ <a href="/">Action link</a>, <a href="/">Action link 2</a> ] }
    >
      Insight content goes in this area here. It will probably be a couple of lines long and may
      include an accompanying image. We might consider color-coding the icon for quicker
      scanning.
    </ActivityCard>
  );
}

Props

  • title: A title for this card (required).
  • subtitle: An element rendered right under the title.
  • children: Content used in the body of the action card (required).
  • actions: A list of links or buttons shown in the footer of the card.
  • date: The timestamp associated with this activity.
  • icon: An icon or avatar used to identify this activity. Defaults to Gridicon "notice-outline".
  • unread: If this prop is present, the card has a small red bubble indicating an "unread" item. Defaults to false.