block.json
69 lines
| 1 | { |
| 2 | "name": "kubio/post-author-avatar", |
| 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 | "url": { |
| 17 | "type": "string" |
| 18 | }, |
| 19 | "avatarSize": { |
| 20 | "type": "string", |
| 21 | "default": "50" |
| 22 | } |
| 23 | }, |
| 24 | "supports": { |
| 25 | "kubio": { |
| 26 | "appearanceEffect": true, |
| 27 | "elementsEnum": { |
| 28 | "OUTER": "outer", |
| 29 | "IMAGE": "image" |
| 30 | }, |
| 31 | "elementsByName": { |
| 32 | "outer": { |
| 33 | "wrapper": true, |
| 34 | "props": { |
| 35 | "className": [ |
| 36 | "author-avatar-block" |
| 37 | ] |
| 38 | } |
| 39 | }, |
| 40 | "image": { |
| 41 | "default": true, |
| 42 | "props": { |
| 43 | "tag": "img" |
| 44 | } |
| 45 | } |
| 46 | }, |
| 47 | "template": { |
| 48 | "type": "element", |
| 49 | "props": { |
| 50 | "name": "outer" |
| 51 | }, |
| 52 | "children": [ |
| 53 | { |
| 54 | "type": "LinkWrapper", |
| 55 | "children": [ |
| 56 | { |
| 57 | "type": "element", |
| 58 | "props": { |
| 59 | "name": "image" |
| 60 | } |
| 61 | } |
| 62 | ] |
| 63 | } |
| 64 | ] |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 |