woocommerce/plugins/woocommerce-blocks/assets/js/icons
Alexandre Lara a39958a4a7
[Experimental] Product Filters Redesign > Status filter block: Rename Stock Status Filter to Status Filter (#52076)
* Rename Stock Status Filter to Status Filter

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Fix e2e test error

* fix php lint error

* Fix php lint errors

* fix php lint errors

* Update variable name to match the new block name

* Update block name

* Rename variables to match new block name

* fix import error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-24 14:16:54 -03:00
..
docs Add Notices Documentation to Storybook and upgrade to Storybook 7 (https://github.com/woocommerce/woocommerce-blocks/pull/11524) 2023-11-02 13:01:42 +00:00
library [Experimental] Product Filters Redesign > Status filter block: Rename Stock Status Filter to Status Filter (#52076) 2024-10-24 14:16:54 -03:00
README.md Update broken docs links (#51967) 2024-10-10 17:37:27 +01:00
index.js [Experimental] Product Filters Redesign > Status filter block: Rename Stock Status Filter to Status Filter (#52076) 2024-10-24 14:16:54 -03:00

README.md

Icons

Table of contents

WooCommerce Blocks Icons Library.

Usage

Note we use the Icon component from @wordpress/icons. We use some SVG icons from @woocommerce/icons for WC Blocks specific icons, but we also use existing icons from @wordpress/icons.

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

<Icon icon={ woo } /> // icon  from '@woocommerce/icons'
<Icon icon={ postComments } /> // icon from '@wordpress/icons'
<Icon icon={ woo } size={ 16 } />
<Icon icon={ woo } width={ 20 } height={ Math.floor( 20 * 1.67 ) } />

Adding Icons

Before adding a new icon, make sure the icon is not already included in the Library that comes with @wordpress/icons package. If there is no existing icon suitable:

  1. Add the icon file to ./library folder.
  2. Make sure to use SVG primitive from @wordpress/primitives 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.

We're hiring! Come work with us!

🐞 Found a mistake, or have a suggestion? Leave feedback about this document here.