From 0847c20f7901f13b287d3d726d46225f067777c8 Mon Sep 17 00:00:00 2001 From: Alexandre Lara Date: Fri, 19 May 2023 12:09:13 -0300 Subject: [PATCH] Remove the fill color of the Product Details icon and move it to the icons library (https://github.com/woocommerce/woocommerce-blocks/pull/9503) --- .../product-details/index.tsx | 19 ++++++------- .../assets/js/icons/index.js | 1 + .../js/icons/library/product-details.tsx | 27 +++++++++++++++++++ .../product-details/product-details-icon.svg | 5 ---- 4 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 plugins/woocommerce-blocks/assets/js/icons/library/product-details.tsx delete mode 100644 plugins/woocommerce-blocks/images/blocks/product-details/product-details-icon.svg diff --git a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/product-details/index.tsx b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/product-details/index.tsx index 0ffdc64d2b5..9be38da808f 100644 --- a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/product-details/index.tsx +++ b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/product-details/index.tsx @@ -2,7 +2,8 @@ * External dependencies */ import { registerBlockSingleProductTemplate } from '@woocommerce/atomic-utils'; -import { WC_BLOCKS_IMAGE_URL } from '@woocommerce/block-settings'; +import { Icon } from '@wordpress/icons'; +import { productDetails } from '@woocommerce/icons'; /** * Internal dependencies @@ -16,16 +17,12 @@ registerBlockSingleProductTemplate( { blockMetadata: metadata, blockSettings: { icon: { - src: () => { - return ( - <> - - - ); - }, + src: ( + + ), }, edit, ancestor: [ 'woocommerce/single-product' ], diff --git a/plugins/woocommerce-blocks/assets/js/icons/index.js b/plugins/woocommerce-blocks/assets/js/icons/index.js index 70acf6bdd56..0641668b871 100644 --- a/plugins/woocommerce-blocks/assets/js/icons/index.js +++ b/plugins/woocommerce-blocks/assets/js/icons/index.js @@ -17,3 +17,4 @@ export { default as Alert } from './library/alert'; export { default as customerAccount } from './library/customer-account'; export { default as customerAccountStyle } from './library/customer-account-style'; export { default as customerAccountStyleAlt } from './library/customer-account-style-alt'; +export { default as productDetails } from './library/product-details'; diff --git a/plugins/woocommerce-blocks/assets/js/icons/library/product-details.tsx b/plugins/woocommerce-blocks/assets/js/icons/library/product-details.tsx new file mode 100644 index 00000000000..ac02ff8667e --- /dev/null +++ b/plugins/woocommerce-blocks/assets/js/icons/library/product-details.tsx @@ -0,0 +1,27 @@ +/** + * External dependencies + */ +import { SVG } from '@wordpress/primitives'; + +const productDetails = ( + + + + + +); + +export default productDetails; diff --git a/plugins/woocommerce-blocks/images/blocks/product-details/product-details-icon.svg b/plugins/woocommerce-blocks/images/blocks/product-details/product-details-icon.svg deleted file mode 100644 index ef2a705b50b..00000000000 --- a/plugins/woocommerce-blocks/images/blocks/product-details/product-details-icon.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - -