2024-02-28 21:02:05 +03:00
|
|
|
import React, { type FC } from 'react';
|
2024-01-31 03:01:58 +03:00
|
|
|
import classNames from 'classnames';
|
|
|
|
import StarIcon from '@mui/icons-material/Star';
|
|
|
|
import Box from '@mui/material/Box';
|
2024-02-29 04:21:24 +03:00
|
|
|
import { useTheme } from '@mui/material/styles';
|
2024-01-31 03:01:58 +03:00
|
|
|
|
|
|
|
interface StarIconsProps {
|
|
|
|
className?: string;
|
|
|
|
communityRating: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
const StarIcons: FC<StarIconsProps> = ({ className, communityRating }) => {
|
2024-02-29 04:21:24 +03:00
|
|
|
const theme = useTheme();
|
2024-01-31 03:01:58 +03:00
|
|
|
const cssClass = classNames(
|
|
|
|
'mediaInfoItem',
|
|
|
|
'mediaInfoText',
|
|
|
|
'starRatingContainer',
|
|
|
|
className
|
|
|
|
);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Box className={cssClass}>
|
|
|
|
<StarIcon fontSize={'small'} sx={{
|
2024-02-29 04:21:24 +03:00
|
|
|
color: theme.palette.starIcon.main
|
2024-01-31 03:01:58 +03:00
|
|
|
}} />
|
|
|
|
{communityRating.toFixed(1)}
|
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default StarIcons;
|