01602f90bf
* Add back icon * Add cart URL constant * Add button components * Implement button components into checkout * Update checkout styles to match mockup incl updates to margins and padding * Add options to control return to cart link * Use checkout context * Update snapshot * Update context * href * Color/arrow styling * Implement select instead of open URL field * Add notice and updated settings control * Show notice conditonally * Store permalinks to avoid extra API requests, and get pages via API * Update snapshots * Fix double layout conflict * Switch back to ID and add permalink via block setting * snaps * Fix snapshot; add default shape for pages * Feedback * Better undefined handling * Update assets/js/blocks/cart-checkout/checkout/block.js Co-Authored-By: Darren Ethier <darren@roughsmootheng.in> Co-authored-by: Darren Ethier <darren@roughsmootheng.in> |
||
---|---|---|
.. | ||
icon | ||
library | ||
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
.