1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Replace hardcoded color with theme reference

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
grafixeyehero 2024-02-29 04:21:24 +03:00
parent 511f8340ef
commit bbc1860bde
3 changed files with 23 additions and 3 deletions

View file

@ -2,6 +2,7 @@ import React, { type FC } from 'react';
import classNames from 'classnames';
import StarIcon from '@mui/icons-material/Star';
import Box from '@mui/material/Box';
import { useTheme } from '@mui/material/styles';
interface StarIconsProps {
className?: string;
@ -9,6 +10,7 @@ interface StarIconsProps {
}
const StarIcons: FC<StarIconsProps> = ({ className, communityRating }) => {
const theme = useTheme();
const cssClass = classNames(
'mediaInfoItem',
'mediaInfoText',
@ -19,7 +21,7 @@ const StarIcons: FC<StarIconsProps> = ({ className, communityRating }) => {
return (
<Box className={cssClass}>
<StarIcon fontSize={'small'} sx={{
color: '#f2b01e'
color: theme.palette.starIcon.main
}} />
{communityRating.toFixed(1)}
</Box>