import {IconButton, Rating} from "@mui/material"; import CloseIcon from '@mui/icons-material/Close'; import NameField from "~/components/itemDialog/NameField"; import {useState} from "react"; export default function QualityItem({ name, value, setValue, labels }:{ name: string|undefined, value: number, setValue: Function, labels: { [key: string]: string} }) { const [hoverText, setHoverText] = useState(0); return ( <>
{name}
{ setValue(newValue ? newValue : 0); }} onChangeActive={(event, newHover) => { setHoverText(newHover); }} /> {labels[hoverText !== -1 ? hoverText : value]}
) }