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

Commit 93085f7

Browse files
authored
Add previews for the category list and product search (#1123)
* Enable preview for product search block * Enable category preview
1 parent 10d4fb8 commit 93085f7

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

assets/js/blocks/product-categories/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ registerBlockType( 'woocommerce/product-categories', {
2727
supports: {
2828
align: [ 'wide', 'full' ],
2929
},
30-
30+
example: {
31+
attributes: {
32+
hasCount: true,
33+
},
34+
},
3135
attributes: {
3236
/**
3337
* Whether to show the product count in each category.

assets/js/blocks/product-search/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ registerBlockType( 'woocommerce/product-search', {
3030
supports: {
3131
align: [ 'wide', 'full' ],
3232
},
33-
33+
example: {
34+
attributes: {
35+
hasLabel: true,
36+
},
37+
},
3438
attributes: {
3539
/**
3640
* Whether to show the field label.

0 commit comments

Comments
 (0)