230606c7f7
* Set up incompatiblePaymentMethods in data store * Save incompatible payment methods in data store * Create the IncompatibilityPaymentGatewaysNotice * Fix hidden notice bug * Rename "paymentAdminLink" to GlobalPaymentMethod and move to types dir * Add all registered methods to incompatiblePaymentMethods state * Rename selector to getIncompatiblePaymentMethods * Remove incompatible methods when adding available ones * Remove unused reducer cases * Stop adding incompatible methods now that we add them in default state * Display incompatible methods in the notice from the data store * Refactor incompatible payment gateways notice * Update the incompatible extensions notice's design * Hide Make as default notice We hide this notice while the notification for incompatible payment gateways is visible * Hide the sidebar compatibility notice Hide this notice while the notification for incompatible payment gateways is visible. And show it otherwise. * Capitalize the label for the button on the page settings notice * Fix missing 'globalPaymentMethods' bug on frontend * Highlight incompatible payments in sidebar Highlight incompatible payment gateways within the Payment Options Block * Rename the incompatible gateways notice's component * Support plural and singular forms for the notice * Update incompatible extensions notice's design * Use the simplified types import Co-authored-by: Niels Lange <info@nielslange.de> * Add translation support to notice message * Fix failing unit tests Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com> Co-authored-by: Niels Lange <info@nielslange.de> |
||
---|---|---|
.. | ||
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.