import * as React from 'react'; import { styled } from '@mui/material/styles'; import Rating, { IconContainerProps } from '@mui/material/Rating'; import SentimentVeryDissatisfiedIcon from '@mui/icons-material/SentimentVeryDissatisfied'; import SentimentDissatisfiedIcon from '@mui/icons-material/SentimentDissatisfied'; import SentimentSatisfiedIcon from '@mui/icons-material/SentimentSatisfied'; import SentimentSatisfiedAltIcon from '@mui/icons-material/SentimentSatisfiedAltOutlined'; import SentimentVerySatisfiedIcon from '@mui/icons-material/SentimentVerySatisfied'; const StyledRating = styled(Rating)(({ theme }) => ({ '& .MuiRating-iconEmpty .MuiSvgIcon-root': { color: theme.palette.action.disabled, }, })); const customIcons: { [index: string]: { icon: React.ReactElement; label: string; }; } = { 1: { icon: , label: 'Very Dissatisfied', }, 2: { icon: , label: 'Dissatisfied', }, 3: { icon: , label: 'Neutral', }, 4: { icon: , label: 'Satisfied', }, 5: { icon: , label: 'Very Satisfied', }, }; function IconContainer(props: IconContainerProps) { const { value, ...other } = props; return {customIcons[value].icon}; } export default function RadioGroupRating() { return ( customIcons[value].label} highlightSelectedOnly /> ); }