import classNames from 'classnames' import { ReactNode } from 'react' import { Tooltip } from 'components/Tooltip' import useStore from 'store' interface Props { tooltip: string | ReactNode strokeWidth?: number background?: string diameter?: number value: number label?: string } export const Gauge = ({ background = '#15161A', diameter = 40, value = 0, label, tooltip, }: Props) => { const enableAnimations = useStore((s) => s.enableAnimations) const percentage = value * 100 const percentageValue = percentage > 100 ? 100 : percentage < 0 ? 0 : percentage const semiCirclePercentage = percentageValue == -50 ? 0 : Math.abs(percentageValue / 2 - 50) return (
{label && ( {label} )}
) }