From a2976f4252619d84c4bc4dff335975cbf9da60e6 Mon Sep 17 00:00:00 2001 From: Aoife Date: Sun, 4 Apr 2021 02:21:17 -0400 Subject: [PATCH] Add tooltip to drag --- src/features/utils/components.js | 162 ++++++++++++++++--------------- 1 file changed, 86 insertions(+), 76 deletions(-) diff --git a/src/features/utils/components.js b/src/features/utils/components.js index 768c60d..6228f7b 100644 --- a/src/features/utils/components.js +++ b/src/features/utils/components.js @@ -154,90 +154,100 @@ function Knob({ }, [onMouseMove]); return ( -
- - - - - - {/* Track outer */} - - {/* Value fill */} - - - + {/* TOOLTIP */} +
+ {Math.round(value * maxValue)} +
+
- {/* Knob */} - - {/* Highlight */} - + position: 'relative', + cursor: 'pointer', + height: size, + width: size, + overflow: 'hidden', + flexShrink: 0, + }} + onMouseDown={onMouseDown}> + {/* KNOB */} + + + + + + {/* Track outer */} + + {/* Value fill */} + + - { - - } + {/* Knob */} + + {/* Highlight */} + + + { + + } + - +
); }