10ceda5851
* Use colors variables instead of hardcoded values when possible * Update WC colors from @automattic/color-studio * Decrease specificity of price-slider CSS selectors * Update colors to WC purple * Update bright colors * Update grays * Update blacks and whites * Add @todo comment * Remove unnecessary blank line * Remove purple color from price slider handle * Fix colors not shown in SVG background * Remove unnecessary box-shadow declaration * Add theming docs * Refactor/remove SCSS variables * Add @todo comment to breakpoints * Update package-lock.json |
||
---|---|---|
.. | ||
icon | ||
library | ||
stories | ||
README.md | ||
index.js |
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
- Add the icon file to
./library
folder. - Make sure to use
SVG
primitive from@wordpress/components
and not a native svg.SVG
offers more accessibility features. - Remove width and height since they're handled by Icon.
- Remove any hardcoded colors on the svg. If necessary, use
CurrentColor
. - Export the Icon in
./library/index.js
.