block.json
67 lines
| 1 | { |
| 2 | "name": "woocommerce/product-button", |
| 3 | "version": "1.0.0", |
| 4 | "title": "Add to Cart Button", |
| 5 | "description": "Display a call to action button which either adds the product to the cart, or links to the product page.", |
| 6 | "category": "woocommerce", |
| 7 | "keywords": [ "WooCommerce" ], |
| 8 | "usesContext": [ "query", "queryId", "postId" ], |
| 9 | "textdomain": "woocommerce", |
| 10 | "attributes": { |
| 11 | "productId": { |
| 12 | "type": "number", |
| 13 | "default": 0 |
| 14 | }, |
| 15 | "textAlign": { |
| 16 | "type": "string", |
| 17 | "default": "" |
| 18 | }, |
| 19 | "width": { |
| 20 | "type": "number" |
| 21 | }, |
| 22 | "isDescendentOfSingleProductBlock": { |
| 23 | "type": "boolean", |
| 24 | "default": false |
| 25 | }, |
| 26 | "isDescendentOfQueryLoop": { |
| 27 | "type": "boolean", |
| 28 | "default": false |
| 29 | } |
| 30 | }, |
| 31 | "supports": { |
| 32 | "align": [ "wide", "full" ], |
| 33 | "color": { |
| 34 | "background": false, |
| 35 | "link": true |
| 36 | }, |
| 37 | "interactivity": true, |
| 38 | "html": false, |
| 39 | "typography": { |
| 40 | "fontSize": true, |
| 41 | "lineHeight": true |
| 42 | } |
| 43 | }, |
| 44 | "ancestor": [ |
| 45 | "woocommerce/all-products", |
| 46 | "woocommerce/single-product", |
| 47 | "core/post-template", |
| 48 | "woocommerce/product-template" |
| 49 | ], |
| 50 | "styles": [ |
| 51 | { |
| 52 | "name": "fill", |
| 53 | "label": "Fill", |
| 54 | "isDefault": true |
| 55 | }, |
| 56 | { |
| 57 | "name": "outline", |
| 58 | "label": "Outline" |
| 59 | } |
| 60 | ], |
| 61 | "viewScript": [ |
| 62 | "wc-product-button-interactivity-frontend" |
| 63 | ], |
| 64 | "apiVersion": 2, |
| 65 | "$schema": "https://schemas.wp.org/trunk/block.json" |
| 66 | } |
| 67 |