block.json
2 weeks ago
index-rtl.css
2 weeks ago
index.asset.php
2 weeks ago
index.css
2 weeks ago
index.js
2 weeks ago
style-index-rtl.css
2 weeks ago
style-index.css
2 weeks ago
block.json
88 lines
| 1 | { |
| 2 | "$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 | "apiVersion": 3, |
| 4 | "name": "superb-addons/add-to-cart", |
| 5 | "version": "0.1.0", |
| 6 | "title": "Superb Add to Cart", |
| 7 | "category": "superb-addons-blocks", |
| 8 | "icon": "cart", |
| 9 | "description": "Add to Cart or Buy Now button for WooCommerce products, with direct checkout and post-add popup trigger.", |
| 10 | "keywords": ["woocommerce", "cart", "buy", "checkout", "product", "add to cart"], |
| 11 | "usesContext": ["postId", "postType"], |
| 12 | "supports": { |
| 13 | "html": false, |
| 14 | "align": ["wide", "full"], |
| 15 | "color": { |
| 16 | "text": true, |
| 17 | "background": true, |
| 18 | "link": false, |
| 19 | "__experimentalSkipSerialization": true |
| 20 | }, |
| 21 | "typography": { |
| 22 | "__experimentalSkipSerialization": true, |
| 23 | "fontSize": true, |
| 24 | "lineHeight": true, |
| 25 | "__experimentalFontFamily": true, |
| 26 | "__experimentalFontWeight": true, |
| 27 | "__experimentalFontStyle": true, |
| 28 | "__experimentalTextTransform": true, |
| 29 | "__experimentalTextDecoration": true, |
| 30 | "__experimentalLetterSpacing": true, |
| 31 | "__experimentalDefaultControls": { |
| 32 | "fontSize": true |
| 33 | } |
| 34 | }, |
| 35 | "__experimentalBorder": { |
| 36 | "radius": true, |
| 37 | "color": true, |
| 38 | "width": true, |
| 39 | "style": true, |
| 40 | "__experimentalSkipSerialization": true, |
| 41 | "__experimentalDefaultControls": { |
| 42 | "radius": true |
| 43 | } |
| 44 | }, |
| 45 | "spacing": { |
| 46 | "margin": true, |
| 47 | "padding": true, |
| 48 | "__experimentalSkipSerialization": true, |
| 49 | "__experimentalDefaultControls": { |
| 50 | "padding": true |
| 51 | } |
| 52 | }, |
| 53 | "__experimentalSelector": ".wp-block-superb-addons-add-to-cart .wp-block-button__link" |
| 54 | }, |
| 55 | "styles": [ |
| 56 | { |
| 57 | "name": "fill", |
| 58 | "label": "Fill", |
| 59 | "isDefault": true |
| 60 | }, |
| 61 | { |
| 62 | "name": "outline", |
| 63 | "label": "Outline" |
| 64 | } |
| 65 | ], |
| 66 | "attributes": { |
| 67 | "productId": { "type": "number", "default": 0 }, |
| 68 | "productSource": { "type": "string", "default": "specific" }, |
| 69 | "displayMode": { "type": "string", "default": "ajax" }, |
| 70 | "buttonText": { "type": "string", "default": "" }, |
| 71 | "quantity": { "type": "number", "default": 1 }, |
| 72 | "quantitySelector": { "type": "string", "default": "off" }, |
| 73 | "quantitySelectorPosition": { "type": "string", "default": "left" }, |
| 74 | "quantityMin": { "type": "number", "default": 1 }, |
| 75 | "quantityMax": { "type": "number", "default": 99 }, |
| 76 | "lockedVariationId": { "type": "number", "default": 0 }, |
| 77 | "coupon": { "type": "string", "default": "" }, |
| 78 | "popupId": { "type": "string", "default": "" }, |
| 79 | "blockId": { "type": "string", "default": "" }, |
| 80 | "buttonAlign": { "type": "string" }, |
| 81 | "isPreview": { "type": "boolean", "default": false } |
| 82 | }, |
| 83 | "textdomain": "superb-blocks", |
| 84 | "editorScript": "file:./index.js", |
| 85 | "editorStyle": "file:./index.css", |
| 86 | "style": "file:./style-index.css" |
| 87 | } |
| 88 |