woocommerce/plugins/woocommerce-blocks/assets/js/icons
Mike Jolley 61a5b7b132 Add checkout error state (https://github.com/woocommerce/woocommerce-blocks/pull/2069)
* Add checkout error state

* Update message wording and icon
2020-03-31 11:47:48 +01:00
..
icon Prevent wp.components loading on frontend (https://github.com/woocommerce/woocommerce-blocks/pull/1918) 2020-03-10 11:20:40 +00:00
library Add checkout error state (https://github.com/woocommerce/woocommerce-blocks/pull/2069) 2020-03-31 11:47:48 +01:00
README.md add new icons and remove old ones (https://github.com/woocommerce/woocommerce-blocks/pull/1644) 2020-01-31 19:20:33 +01:00
index.js Add checkout error state (https://github.com/woocommerce/woocommerce-blocks/pull/2069) 2020-03-31 11:47:48 +01:00

README.md

Icons

WooCommerce Blocks Icons Library.

Usage

import { Icon, bill, woo } from '@woocommerce/icons';

<Icon srcElement={ bill } />

<Icon srcElement={ bill } size={ 16 } />

<Icon srcElement={ woo } width={ 20 } height={ Math.floor( 20 * 1.67 ) } />

Props

Name Type Default Description
size integer 24 Size of icon in pixels.

Adding Icons

  1. Add the icon file to ./library folder.
  2. Make sure to use SVG primitive from @wordpress/components and not a native svg. SVG offers more accessibility features.
  3. Remove width and height since they're handled by Icon.
  4. Remove any hardcoded colors on the svg. If necessary, use CurrentColor.
  5. Export the Icon in ./library/index.js.