import Tippy from '@tippyjs/react'; import clsx from 'clsx'; import 'tippy.js/dist/tippy.css'; import styles from './SliderTooltip.module.css'; export interface Props { value: string; child: React.ReactElement; delay: number; zIndex?: number; } export function SliderTooltip({ value, child, delay, zIndex = 50 }: Props) { return ( {child} ); } function messageHTML(value: string) { let message = value; if (message === '0') { message = 'unlimited'; } return
{message}
; }