block.json
11 months ago
button-cart.php
6 months ago
button-quick-view.php
6 months ago
controller.php
6 months ago
index-rtl.css
11 months ago
index.asset.php
1 month ago
index.css
11 months ago
index.js
1 month ago
block.json
111 lines
| 1 | { |
| 2 | "$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 | "apiVersion": 3, |
| 4 | "name": "surecart/product-quick-view-button", |
| 5 | "title": "Quick Add Button", |
| 6 | "description": "Display the product quick add to cart button.", |
| 7 | "version": "1.0.0", |
| 8 | "category": "surecart-product-list", |
| 9 | "example": { |
| 10 | "attributes": { |
| 11 | "quick_view_button_type": "both" |
| 12 | } |
| 13 | }, |
| 14 | "usesContext": [ |
| 15 | "postId" |
| 16 | ], |
| 17 | "ancestor": [ |
| 18 | "surecart/product-template" |
| 19 | ], |
| 20 | "attributes": { |
| 21 | "icon": { |
| 22 | "type": "string", |
| 23 | "default": "plus" |
| 24 | }, |
| 25 | "icon_position": { |
| 26 | "type": "string", |
| 27 | "default": "before" |
| 28 | }, |
| 29 | "label": { |
| 30 | "type": "string", |
| 31 | "default": "Add" |
| 32 | }, |
| 33 | "quick_view_button_type": { |
| 34 | "type": "string", |
| 35 | "default": "both" |
| 36 | }, |
| 37 | "width": { |
| 38 | "type": "number" |
| 39 | }, |
| 40 | "direct_add_to_cart": { |
| 41 | "type": "boolean", |
| 42 | "default": true |
| 43 | } |
| 44 | }, |
| 45 | "supports": { |
| 46 | "interactivity": true, |
| 47 | "color": { |
| 48 | "gradients": true, |
| 49 | "link": false, |
| 50 | "__experimentalDefaultControls": { |
| 51 | "background": true, |
| 52 | "text": true |
| 53 | } |
| 54 | }, |
| 55 | "spacing": { |
| 56 | "margin": true, |
| 57 | "padding": true, |
| 58 | "blockGap": true |
| 59 | }, |
| 60 | "typography": { |
| 61 | "fontSize": true, |
| 62 | "lineHeight": true, |
| 63 | "textAlign": true, |
| 64 | "__experimentalFontFamily": true, |
| 65 | "__experimentalFontWeight": true, |
| 66 | "__experimentalFontStyle": true, |
| 67 | "__experimentalTextTransform": true, |
| 68 | "__experimentalTextDecoration": true, |
| 69 | "__experimentalLetterSpacing": true, |
| 70 | "__experimentalDefaultControls": { |
| 71 | "fontSize": true, |
| 72 | "fontAppearance": true, |
| 73 | "textTransform": true |
| 74 | } |
| 75 | }, |
| 76 | "__experimentalBorder": { |
| 77 | "color": true, |
| 78 | "radius": true, |
| 79 | "style": true, |
| 80 | "width": true |
| 81 | }, |
| 82 | "__experimentalSelector": ".wp-block-button .wp-block-button__link" |
| 83 | }, |
| 84 | "styles": [ |
| 85 | { |
| 86 | "name": "default", |
| 87 | "label": "Default", |
| 88 | "isDefault": true |
| 89 | }, |
| 90 | { |
| 91 | "name": "show-on-hover", |
| 92 | "label": "Show on hover" |
| 93 | } |
| 94 | ], |
| 95 | "textdomain": "surecart", |
| 96 | "render": "file:./view.php", |
| 97 | "editorScript": "file:./index.js", |
| 98 | "editorStyle": "file:./index.css", |
| 99 | "viewScriptModule": [ |
| 100 | "@surecart/checkout", |
| 101 | "@surecart/product-page", |
| 102 | "@surecart/product-list", |
| 103 | "@surecart/product-quick-view" |
| 104 | ], |
| 105 | "style": [ |
| 106 | "surecart-product-quick-view-button", |
| 107 | "surecart-wp-buttons", |
| 108 | "surecart-wp-button", |
| 109 | "wp-block-button" |
| 110 | ] |
| 111 | } |