@@ -10,8 +10,9 @@ Labelled(
1010 template( #help-text , v-if ="hasSlot(slots['help-text'])" )
1111 slot( name ="help-text" )
1212 div( :class ="classNames(styles.DualThumb, sharedStyles.RangeSlider)" )
13- div( v-if ="slots.prefix" , :class ="styles.Prefix" )
14- slot( name ="prefix" )
13+ div( v-if ="hasSlot(slots.prefix) || prefix" , :class ="styles.Prefix" )
14+ slot( v-if ="hasSlot(slots.prefix)" , name ="prefix" )
15+ template( v-else ) {{ prefix }}
1516 div(
1617 :class ="trackWrapperClassName" ,
1718 ref ="trackWrapper" ,
@@ -79,8 +80,9 @@ Labelled(
7980 )
8081 div( :class ="styles.OutputBubble" )
8182 span( :class ="styles.OutputText" ) {{ value[1] }}
82- div( v-if ="slots.suffix" , :class ="styles.Suffix" )
83- slot( name ="suffix" )
83+ div( v-if ="hasSlot(slots.suffix) || suffix" , :class ="styles.Suffix" )
84+ slot( v-if ="hasSlot(slots.suffix)" , name ="suffix" )
85+ template( v-else ) {{ suffix }}
8486EventListener(
8587 event ="resize" ,
8688 :handler ="setTrackPosition" ,
@@ -121,6 +123,10 @@ interface DualThumbProps {
121123 error? : ErrorType ;
122124 /** Disable input */
123125 disabled? : boolean ;
126+ /** Element to display before the input. This prop will be overriden by `prefix` slot. */
127+ prefix? : string ;
128+ /** Element to display after the input. This prop will be overriden by `suffix` slot. */
129+ suffix? : string ;
124130}
125131
126132interface KeyHandlers {
0 commit comments