block.json
72 lines
| 1 | { |
| 2 | "name": "kubio/post-title", |
| 3 | "category": "kubio-blog-components", |
| 4 | "attributes": { |
| 5 | "kubio": { |
| 6 | "type": "object" |
| 7 | }, |
| 8 | "headingType": { |
| 9 | "type": "string", |
| 10 | "default": "h2" |
| 11 | } |
| 12 | }, |
| 13 | "usesContext": [ |
| 14 | "postId", |
| 15 | "postType" |
| 16 | ], |
| 17 | "supports": { |
| 18 | "kubio": { |
| 19 | "appearanceEffect": true, |
| 20 | "default": { |
| 21 | "style": { |
| 22 | "descendants": { |
| 23 | "link": { |
| 24 | "typography": { |
| 25 | "decoration": "none" |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | }, |
| 30 | "props": {} |
| 31 | }, |
| 32 | "elementsEnum": { |
| 33 | "CONTAINER": "container", |
| 34 | "LINK": "link" |
| 35 | }, |
| 36 | "elementsByName": { |
| 37 | "container": { |
| 38 | "tag": "h2", |
| 39 | "selector": "p.wp-block, h1.wp-block, h2.wp-block, h3.wp-block, h4.wp-block, h5.wp-block, h6.wp-block", |
| 40 | "selectorPrepend": true, |
| 41 | "wrapper": true, |
| 42 | "default": true |
| 43 | }, |
| 44 | "link": { |
| 45 | "prefixWithTag": true, |
| 46 | "internal": true, |
| 47 | "props": { |
| 48 | "className": [ |
| 49 | "d-block" |
| 50 | ], |
| 51 | "tag": "a" |
| 52 | } |
| 53 | } |
| 54 | }, |
| 55 | "template": { |
| 56 | "type": "element", |
| 57 | "props": { |
| 58 | "name": "link" |
| 59 | }, |
| 60 | "children": [ |
| 61 | { |
| 62 | "type": "element", |
| 63 | "props": { |
| 64 | "name": "container" |
| 65 | } |
| 66 | } |
| 67 | ] |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 |