Skip to content

Commit ba31f17

Browse files
fix: vertically align epoch slider
1 parent 19dd6ee commit ba31f17

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

src/features/Navigation/EpochSlider.tsx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ function SliderEpochProgress({
301301
const MSliderEpochProgress = memo(SliderEpochProgress);
302302

303303
function SliderThumbTooltip({ isOpen }: { isOpen: boolean }) {
304+
const slotOverride = useAtomValue(slotOverrideAtom);
305+
304306
const { showNav } = useSlotsNavigation();
305307
const { refs, elements, floatingStyles, update } = useFloating({
306308
placement: "right",
@@ -328,31 +330,23 @@ function SliderThumbTooltip({ isOpen }: { isOpen: boolean }) {
328330
})}
329331
/>
330332
<FloatingPortal id="app">
331-
<div
333+
<Text
334+
size="1"
332335
ref={refs.setFloating}
333336
style={floatingStyles}
334337
className={clsx(
335338
"rt-TooltipContent",
339+
"rt-TooltipText",
336340
isOpen ? styles.show : styles.hide,
337341
)}
338342
>
339-
<SlotOverrideText />
340-
</div>
343+
{slotOverride}
344+
</Text>
341345
</FloatingPortal>
342346
</>
343347
);
344348
}
345349

346-
function SlotOverrideText() {
347-
const slotOverride = useAtomValue(slotOverrideAtom);
348-
349-
return (
350-
<Text size="1" className="rt-TooltipText">
351-
{slotOverride}
352-
</Text>
353-
);
354-
}
355-
356350
const isFutureSlotAtom = (slot: number) =>
357351
atom((get) => {
358352
const currentSlot = get(currentLeaderSlotAtom);

0 commit comments

Comments
 (0)