File tree 3 files changed +53
-0
lines changed
3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 409
409
template : CV . T ( '/javascripts/countly/vue/templates/content/UI/content-sidebar-input.html' ) ,
410
410
411
411
props : {
412
+ componentTooltip : {
413
+ default : null ,
414
+ type : String
415
+ } ,
416
+
412
417
disabled : {
413
418
default : false ,
414
419
type : Boolean
419
424
type : String
420
425
} ,
421
426
427
+ labelIcon : {
428
+ default : 'cly-io cly-io-question-mark-circle' ,
429
+ type : String
430
+ } ,
431
+ labelTooltip : {
432
+ default : null ,
433
+ type : String
434
+ } ,
435
+
422
436
options : {
423
437
default : ( ) => [ ] ,
424
438
type : Array
457
471
size : {
458
472
default : null ,
459
473
type : String
474
+ } ,
475
+
476
+ withComponentTooltip : {
477
+ default : false ,
478
+ type : Boolean
479
+ } ,
480
+
481
+ withLabelTooltip : {
482
+ default : false ,
483
+ type : Boolean
460
484
}
461
485
} ,
462
486
498
522
return this . isDropdownInput && Array . isArray ( this . options ) && this . options . length ;
499
523
} ,
500
524
525
+ isLabelTooltipVisible ( ) {
526
+ return this . withLabelTooltip && this . labelTooltip ;
527
+ } ,
528
+
501
529
isSliderInput ( ) {
502
530
return this . type === COUNTLY_CONTENT_SIDEBAR_INPUT_COMPONENT_BY_TYPE_SLIDER ;
503
531
} ,
519
547
520
548
mainComponent ( ) {
521
549
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 ;
522
557
}
523
558
}
524
559
} ) ) ;
Original file line number Diff line number Diff line change 17
17
class ="cly-vue-content-builder-sidebar-input__label "
18
18
>
19
19
{{ label }}
20
+ < i
21
+ v-if ="isLabelTooltipVisible "
22
+ v-tooltip.left ="labelTooltip "
23
+ :class ="labelIcon "
24
+ />
20
25
</ label >
21
26
< slot name ="content-builder-layout-step ">
22
27
< component
23
28
:is ="mainComponent "
24
29
v-bind ="$attrs "
25
30
v-model ="componentValue "
31
+ v-tooltip.left ="tooltip "
26
32
class ="cly-vue-content-builder-sidebar-input__component "
27
33
:class ="{ 'cly-vue-content-builder-sidebar-input__component--slider': isSliderInput } "
28
34
:controls ="controlsProp "
Original file line number Diff line number Diff line change 4745
4745
4746
4746
// .cly-vue-content-builder-sidebar-input__label
4747
4747
& __label {
4748
+ display : flex ;
4749
+ align-items : baseline ;
4750
+ justify-content : flex-start ;
4751
+
4748
4752
flex-shrink : 0 ;
4749
4753
margin-right : auto ;
4750
4754
font-size : 13px ;
4751
4755
font-weight : 500 ;
4752
4756
line-height : 16px ;
4757
+
4758
+ // .cly-vue-content-builder-sidebar-input__label i
4759
+ i {
4760
+ margin-left : 4px ;
4761
+ font-size : 13px ;
4762
+ font-weight : 500 ;
4763
+ line-height : 16px ;
4764
+ }
4753
4765
}
4754
4766
4755
4767
// .cly-vue-content-builder-sidebar-input__number-input-suffix
You can’t perform that action at this time.
0 commit comments