block.json
83 lines
| 1 | { |
| 2 | "name": "kubio/post-author-name", |
| 3 | "category": "kubio-blog-components", |
| 4 | "usesContext": [ |
| 5 | "postId", |
| 6 | "postType" |
| 7 | ], |
| 8 | "attributes": { |
| 9 | "kubio": { |
| 10 | "type": "object" |
| 11 | }, |
| 12 | "addLink": { |
| 13 | "type": "boolean", |
| 14 | "default": false |
| 15 | } |
| 16 | }, |
| 17 | "supports": { |
| 18 | "kubio": { |
| 19 | "appearanceEffect": true, |
| 20 | "default": { |
| 21 | "props": {}, |
| 22 | "style": { |
| 23 | "descendants": { |
| 24 | "outer": {}, |
| 25 | "link": {} |
| 26 | } |
| 27 | } |
| 28 | }, |
| 29 | "elementsEnum": { |
| 30 | "OUTER": "outer", |
| 31 | "LINK": "link", |
| 32 | "TEXT": "text" |
| 33 | }, |
| 34 | "elementsByName": { |
| 35 | "outer": { |
| 36 | "wrapper": true, |
| 37 | "props": { |
| 38 | "tag": "div", |
| 39 | "className": [ |
| 40 | "author-name-block d-flex" |
| 41 | ] |
| 42 | } |
| 43 | }, |
| 44 | "text": { |
| 45 | "default": true, |
| 46 | "selector": ".wp-block-kubio-post-author-name__text", |
| 47 | "props": { |
| 48 | "tag": "p" |
| 49 | } |
| 50 | }, |
| 51 | "link": { |
| 52 | "selector": { |
| 53 | "normal": "a p.wp-block-kubio-post-author-name__text", |
| 54 | "hover": "a:hover p.wp-block-kubio-post-author-name__text" |
| 55 | }, |
| 56 | "props": { |
| 57 | "tag": "a" |
| 58 | } |
| 59 | } |
| 60 | }, |
| 61 | "template": { |
| 62 | "type": "element", |
| 63 | "props": { |
| 64 | "name": "outer" |
| 65 | }, |
| 66 | "children": [ |
| 67 | { |
| 68 | "type": "LinkWrapper", |
| 69 | "children": [ |
| 70 | { |
| 71 | "type": "element", |
| 72 | "props": { |
| 73 | "name": "text" |
| 74 | } |
| 75 | } |
| 76 | ] |
| 77 | } |
| 78 | ] |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 |