import { IDisplayCellProps } from "@src/components/fields/types"; import { Grid, Box, useTheme } from "@mui/material"; import { resultColorsScale } from "@src/utils/color"; export default function Slider({ column, value }: IDisplayCellProps) { const theme = useTheme(); const { max, min, unit, colors, }: { max: number; min: number; unit?: string; colors: any; } = { max: 10, min: 0, ...(column as any).config, }; const progress = value < min || typeof value !== "number" ? 0 : ((value - min) / (max - min)) * 100; const percentage = progress / 100; return ( {value ?? 0}/{max} {unit} ); }