block.json
93 lines
| 1 | { |
| 2 | "name": "woocommerce/product-button", |
| 3 | "title": "Add to Cart Button", |
| 4 | "description": "Display a call to action button which either adds the product to the cart, or links to the product page.", |
| 5 | "category": "woocommerce-product-elements", |
| 6 | "keywords": [ "WooCommerce" ], |
| 7 | "usesContext": [ |
| 8 | "query", |
| 9 | "queryId", |
| 10 | "postId", |
| 11 | "collection", |
| 12 | "woocommerce/isDescendantOfAddToCartWithOptions" |
| 13 | ], |
| 14 | "textdomain": "woocommerce", |
| 15 | "attributes": { |
| 16 | "productId": { |
| 17 | "type": "number", |
| 18 | "default": 0 |
| 19 | }, |
| 20 | "textAlign": { |
| 21 | "type": "string", |
| 22 | "default": "" |
| 23 | }, |
| 24 | "width": { |
| 25 | "type": "number" |
| 26 | }, |
| 27 | "isDescendentOfSingleProductBlock": { |
| 28 | "type": "boolean", |
| 29 | "default": false |
| 30 | }, |
| 31 | "isDescendentOfQueryLoop": { |
| 32 | "type": "boolean", |
| 33 | "default": false |
| 34 | } |
| 35 | }, |
| 36 | "supports": { |
| 37 | "align": [ "wide", "full" ], |
| 38 | "color": { |
| 39 | "text": true, |
| 40 | "background": true, |
| 41 | "link": false, |
| 42 | "__experimentalSkipSerialization": true |
| 43 | }, |
| 44 | "interactivity": true, |
| 45 | "html": false, |
| 46 | "typography": { |
| 47 | "fontSize": true, |
| 48 | "lineHeight": true, |
| 49 | "__experimentalFontWeight": true, |
| 50 | "__experimentalFontFamily": true, |
| 51 | "__experimentalFontStyle": true, |
| 52 | "__experimentalTextTransform": true, |
| 53 | "__experimentalTextDecoration": true, |
| 54 | "__experimentalLetterSpacing": true, |
| 55 | "__experimentalDefaultControls": { |
| 56 | "fontSize": true |
| 57 | } |
| 58 | }, |
| 59 | "__experimentalBorder": { |
| 60 | "radius": true, |
| 61 | "__experimentalSkipSerialization": true |
| 62 | }, |
| 63 | "spacing": { |
| 64 | "margin": true, |
| 65 | "padding": true, |
| 66 | "__experimentalSkipSerialization": true |
| 67 | }, |
| 68 | "email": true, |
| 69 | "__experimentalSelector": ".wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button" |
| 70 | }, |
| 71 | "ancestor": [ |
| 72 | "woocommerce/all-products", |
| 73 | "woocommerce/single-product", |
| 74 | "core/post-template", |
| 75 | "woocommerce/product-template" |
| 76 | ], |
| 77 | "styles": [ |
| 78 | { |
| 79 | "name": "fill", |
| 80 | "label": "Fill", |
| 81 | "isDefault": true |
| 82 | }, |
| 83 | { |
| 84 | "name": "outline", |
| 85 | "label": "Outline" |
| 86 | } |
| 87 | ], |
| 88 | "apiVersion": 3, |
| 89 | "$schema": "https://schemas.wp.org/trunk/block.json", |
| 90 | "viewScriptModule": "woocommerce/product-button", |
| 91 | "style": "file:../woocommerce/product-button-style.css" |
| 92 | } |
| 93 |