Skip to content

Commit e850ad0

Browse files
feat: add component tooltip
1 parent 6f8445b commit e850ad0

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

frontend/express/public/javascripts/countly/vue/components/content.js

+17
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,11 @@
409409
template: CV.T('/javascripts/countly/vue/templates/content/UI/content-sidebar-input.html'),
410410

411411
props: {
412+
componentTooltip: {
413+
default: null,
414+
type: String
415+
},
416+
412417
disabled: {
413418
default: false,
414419
type: Boolean
@@ -468,6 +473,11 @@
468473
type: String
469474
},
470475

476+
withComponentTooltip: {
477+
default: false,
478+
type: Boolean
479+
},
480+
471481
withLabelTooltip: {
472482
default: false,
473483
type: Boolean
@@ -537,6 +547,13 @@
537547

538548
mainComponent() {
539549
return COUNTLY_CONTENT_SIDEBAR_INPUT_COMPONENT_BY_TYPE[this.type] || 'div';
550+
},
551+
552+
tooltip() {
553+
if (this.withComponentTooltip) {
554+
return this.componentTooltip || null;
555+
}
556+
return null;
540557
}
541558
}
542559
}));

frontend/express/public/javascripts/countly/vue/templates/content/UI/content-sidebar-input.html

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
:is="mainComponent"
2929
v-bind="$attrs"
3030
v-model="componentValue"
31+
v-tooltip.left="tooltip"
3132
class="cly-vue-content-builder-sidebar-input__component"
3233
:class="{ 'cly-vue-content-builder-sidebar-input__component--slider': isSliderInput }"
3334
:controls="controlsProp"

0 commit comments

Comments
 (0)