From f1c34025ce76e639e2506629e751121adb6643e9 Mon Sep 17 00:00:00 2001 From: "Daniel W. Robert" Date: Fri, 29 Jul 2022 15:40:03 -0400 Subject: [PATCH] Add new icon for mini cart block (#6784) * Add new icon for mini cart block (inserter). See https://github.com/woocommerce/woocommerce-blocks/issues/6617. * Adjust size of SVG The new SVG was rendering a little bit smaller than the original icon. Potentially because of the mask and the artboard size. This commit adjusts the size to render at the same size as the original version of the icon in the inserter. --- assets/js/blocks/mini-cart/index.tsx | 4 +-- assets/js/icons/index.js | 1 + assets/js/icons/library/mini-cart-alt.tsx | 39 +++++++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 assets/js/icons/library/mini-cart-alt.tsx diff --git a/assets/js/blocks/mini-cart/index.tsx b/assets/js/blocks/mini-cart/index.tsx index 3c22edff4..be74cc659 100644 --- a/assets/js/blocks/mini-cart/index.tsx +++ b/assets/js/blocks/mini-cart/index.tsx @@ -2,7 +2,7 @@ * External dependencies */ import { __ } from '@wordpress/i18n'; -import { cart } from '@woocommerce/icons'; +import { miniCartAlt } from '@woocommerce/icons'; import { Icon } from '@wordpress/icons'; import { registerBlockType } from '@wordpress/blocks'; import type { BlockConfiguration } from '@wordpress/blocks'; @@ -19,7 +19,7 @@ const settings: BlockConfiguration = { icon: { src: ( ), diff --git a/assets/js/icons/index.js b/assets/js/icons/index.js index 112f573f5..1dcedb31a 100644 --- a/assets/js/icons/index.js +++ b/assets/js/icons/index.js @@ -11,3 +11,4 @@ export { default as toggle } from './library/toggle'; export { default as totals } from './library/totals'; export { default as woo } from './library/woo'; export { default as miniCart } from './library/mini-cart'; +export { default as miniCartAlt } from './library/mini-cart-alt'; diff --git a/assets/js/icons/library/mini-cart-alt.tsx b/assets/js/icons/library/mini-cart-alt.tsx new file mode 100644 index 000000000..2e57b357f --- /dev/null +++ b/assets/js/icons/library/mini-cart-alt.tsx @@ -0,0 +1,39 @@ +/** + * External dependencies + */ +import { SVG } from '@wordpress/primitives'; + +const miniCartAlt = ( + + + + + + + + + + + + + +); + +export default miniCartAlt;