Skip to content

Commit 03b41ac

Browse files
committed
feat(custom inspector): tag tooltip
1 parent 9dab647 commit 03b41ac

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

docs/plugin/api-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ Each node can have those properties:
276276
- `label`: text displayed in the tag
277277
- `textColor`: text color, for example: `0x000000` for black
278278
- `backgroundColor`: background color, for example: `0xffffff` for white
279+
- `tooltip` (optional): HTML for a tooltip over the tag
279280

280281
Example:
281282

packages/app-frontend/src/features/inspector/custom/CustomInspectorNode.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ export default defineComponent({
114114
<span
115115
v-for="(tag, index) of node.tags"
116116
:key="index"
117+
v-tooltip="{
118+
content: tag.tooltip,
119+
html: true
120+
}"
117121
:style="{
118122
color: `#${tag.textColor.toString(16).padStart(6, '0')}`,
119123
backgroundColor: `#${tag.backgroundColor.toString(16).padStart(6, '0')}`,

0 commit comments

Comments
 (0)