Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Update the icon and description for the Product Details block (#9241)
Browse files Browse the repository at this point in the history
* Update icon and description for the Product Details block

* fix alt
  • Loading branch information
gigitux authored Apr 26, 2023
1 parent 157f49b commit a85ef85
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"icon": "info",
"title": "Product Details",
"description": "A block that allows your customers to see details and reviews about the product.",
"description": "Display a product’s description, attributes, and reviews.",
"category": "woocommerce",
"keywords": [ "WooCommerce" ],
"supports": {
Expand Down
13 changes: 13 additions & 0 deletions assets/js/atomic/blocks/product-elements/product-details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import { registerBlockSingleProductTemplate } from '@woocommerce/atomic-utils';
import { WC_BLOCKS_IMAGE_URL } from '@woocommerce/block-settings';

/**
* Internal dependencies
Expand All @@ -14,6 +15,18 @@ registerBlockSingleProductTemplate( {
// @ts-expect-error: `metadata` currently does not have a type definition in WordPress core
blockMetadata: metadata,
blockSettings: {
icon: {
src: () => {
return (
<>
<img
src={ `${ WC_BLOCKS_IMAGE_URL }/blocks/product-details/product-details-icon.svg` }
alt=""
/>
</>
);
},
},
edit,
ancestor: [ 'woocommerce/single-product' ],
},
Expand Down
5 changes: 5 additions & 0 deletions images/blocks/product-details/product-details-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a85ef85

Please sign in to comment.