Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 1x | import { QuestionMark } from "@mui/icons-material";
import {
DissatisfiedIcon,
ExtremelyDissatisfiedIcon,
ExtremelySatisfiedIcon,
SatisfiedIcon,
SlightlyDissatisfiedIcon,
SlightlySatisfiedIcon,
VeryDissatisfiedIcon,
VerySatisfiedIcon,
} from "components/Icons/index";
interface SliderLabelProps {
value: number | undefined;
}
export default function SliderLabel({ value }: SliderLabelProps) {
Iif (value === undefined) {
return <QuestionMark />;
}
if (value < 0.088) {
return <ExtremelyDissatisfiedIcon />;
} else if (value < 0.125) {
return <VeryDissatisfiedIcon />;
} else if (value < 0.177) {
return <DissatisfiedIcon />;
} else if (value < 0.25) {
return <SlightlyDissatisfiedIcon />;
} else if (value < 0.354) {
return <SlightlySatisfiedIcon />;
} else if (value < 0.5) {
return <SatisfiedIcon />;
} else if (value < 0.707) {
return <VerySatisfiedIcon />;
} else {
return <ExtremelySatisfiedIcon />;
}
}
|