99ba060720
* Product Query: add Feedback Prompt in inspector The prompt doesn't appear at the very bottom as there isn't currently any straightforward way to do this in the block variation. More investigation is required. * Product Query: Change icon, description and name * Product Query: switch to Feature plugin flag * Add all currently available atomic blocks to the default Product Query template * Update feature flags doc * Change SKU and Stock Indicator feature flags * Change feature flags docs * Add title prop to the `FeedbackPrompt` and add a title to the Product Query one * Hacky solution to display the feedback block at the bottom The order of the inspector controls is set in Gutenberg. We can hack our way down by hooking to the “color” group and display our feedback there. Other panels would be displayed below that if added, such as borders and margin. * Reduce Product Query default template * Fix e2e tests after Product Query block name change (https://github.com/woocommerce/woocommerce-blocks/pull/7840) * Product Query: Add a better default pattern (https://github.com/woocommerce/woocommerce-blocks/pull/7833) * Product Query: Add a better default pattern * Product Price: Add bottom margin Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com> |
||
---|---|---|
.. | ||
library | ||
stories | ||
README.md | ||
index.js |
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:
- Add the icon file to
./library
folder. - Make sure to use
SVG
primitive from@wordpress/primitives
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
.
We're hiring! Come work with us!
🐞 Found a mistake, or have a suggestion? Leave feedback about this document here.