block.json
64 lines
| 1 | { |
| 2 | "name": "surecart/add-to-cart-button", |
| 3 | "apiVersion": 3, |
| 4 | "title": "Add To Cart Button", |
| 5 | "description": "Display a button to add a specific price to the cart.", |
| 6 | "category": "surecart-product-page", |
| 7 | "keywords": ["name", "customer"], |
| 8 | "textdomain": "surecart", |
| 9 | "parent": null, |
| 10 | "version": "1.0.0", |
| 11 | "supports": { |
| 12 | "interactivity": true, |
| 13 | "html": false |
| 14 | }, |
| 15 | "attributes": { |
| 16 | "button_text": { |
| 17 | "type": "string", |
| 18 | "default": "Add To Cart" |
| 19 | }, |
| 20 | "ad_hoc_label": { |
| 21 | "type": "string", |
| 22 | "default": "Amount" |
| 23 | }, |
| 24 | "backgroundColor": { |
| 25 | "type": "string" |
| 26 | }, |
| 27 | "textColor": { |
| 28 | "type": "string" |
| 29 | }, |
| 30 | "gradient": { |
| 31 | "type": "string" |
| 32 | }, |
| 33 | "radius": { |
| 34 | "type": "number" |
| 35 | }, |
| 36 | "help": { |
| 37 | "type": "string" |
| 38 | }, |
| 39 | "placeholder": { |
| 40 | "type": "string" |
| 41 | }, |
| 42 | "price_id": { |
| 43 | "type": "string" |
| 44 | }, |
| 45 | "variant_id": { |
| 46 | "type": "string" |
| 47 | } |
| 48 | }, |
| 49 | "script": "surecart-components", |
| 50 | "style": [ |
| 51 | "wp-block-button", |
| 52 | "surecart-wp-button", |
| 53 | "surecart-themes-default", |
| 54 | "surecart-input-group", |
| 55 | "surecart-spinner", |
| 56 | "surecart-button", |
| 57 | "surecart-form-control", |
| 58 | "surecart-form-group", |
| 59 | "surecart-text" |
| 60 | ], |
| 61 | "viewScript": ["wp-url", "wp-api-fetch", "wp-i18n", "wp-a11y"], |
| 62 | "viewScriptModule": ["@surecart/product-page", "@surecart/cart"] |
| 63 | } |
| 64 |