You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/src/components/range/range.tsx
+33-5Lines changed: 33 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -50,8 +50,9 @@ import type {
50
50
* @part knob-b - The visual knob element for the second knob. Only available when `dualKnobs` is `true`.
51
51
* @part knob-lower - The visual knob element for the lower knob. Only available when `dualKnobs` is `true`.
52
52
* @part knob-upper - The visual knob element for the upper knob. Only available when `dualKnobs` is `true`.
53
-
* @part pressed - Added to the knob-handle, knob, and pin that is currently being pressed to drag. Only one set has this part at a time.
54
-
* @part focused - Added to the knob-handle, knob, and pin that currently has focus. Only one set has this part at a time.
53
+
* @part pressed - Added to the knob-handle, knob, and pin that is currently being pressed to drag. Only one set has this part at a time when `dualKnobs` is `true`.
54
+
* @part focused - Added to the knob-handle, knob, and pin that currently has focus. Only one set has this part at a time when `dualKnobs` is `true`.
55
+
* @part hover - Added to the knob-handle, knob, and pin when the knob has hover. Only one set has this part at a time.
55
56
*/
56
57
@Component({
57
58
tag: 'ion-range',
@@ -79,8 +80,9 @@ export class Range implements ComponentInterface {
79
80
80
81
@State()privateratioA=0;
81
82
@State()privateratioB=0;
82
-
@State()privatepressedKnob: KnobName;
83
83
@State()privatefocusedKnob: KnobName;
84
+
@State()privatehoveredKnob: KnobName;
85
+
@State()privatepressedKnob: KnobName;
84
86
85
87
/**
86
88
* The color to use from your application's color palette.
@@ -697,6 +699,14 @@ export class Range implements ComponentInterface {
697
699
},0);
698
700
};
699
701
702
+
privateonKnobMouseEnter=(knob: KnobName)=>{
703
+
this.hoveredKnob=knob;
704
+
};
705
+
706
+
privateonKnobMouseLeave=()=>{
707
+
this.hoveredKnob=undefined;
708
+
};
709
+
700
710
/**
701
711
* Returns true if content was passed to the "start" slot
702
712
*/
@@ -722,6 +732,7 @@ export class Range implements ComponentInterface {
722
732
step,
723
733
handleKeyboard,
724
734
focusedKnob,
735
+
hoveredKnob,
725
736
pressedKnob,
726
737
disabled,
727
738
pin,
@@ -869,8 +880,9 @@ export class Range implements ComponentInterface {
0 commit comments