first commit
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import React from "react";
|
||||
import Card from "@mui/material/Card";
|
||||
import { Typography } from "@mui/material";
|
||||
import { styled } from '@mui/material/styles';
|
||||
import Box from '@mui/material/Box';
|
||||
import Rating from '@mui/material/Rating';
|
||||
import FavoriteIcon from '@mui/icons-material/Favorite';
|
||||
import FavoriteBorderIcon from '@mui/icons-material/FavoriteBorder';
|
||||
|
||||
const StyledRating = styled(Rating)({
|
||||
'& .MuiRating-iconFilled': {
|
||||
color: '#ff6d75',
|
||||
},
|
||||
'& .MuiRating-iconHover': {
|
||||
color: '#ff3d47',
|
||||
},
|
||||
});
|
||||
|
||||
export default function Customization() {
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
as="h3"
|
||||
sx={{
|
||||
fontSize: 18,
|
||||
fontWeight: 500,
|
||||
mb: '10px'
|
||||
}}
|
||||
>
|
||||
Customization
|
||||
</Typography>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
'& > legend': { mt: 2 },
|
||||
}}
|
||||
>
|
||||
<Typography component="legend">Custom icon and color</Typography>
|
||||
<StyledRating
|
||||
name="customized-color"
|
||||
defaultValue={2}
|
||||
getLabelText={(value) => `${value} Heart${value !== 1 ? 's' : ''}`}
|
||||
precision={0.5}
|
||||
icon={<FavoriteIcon fontSize="inherit" />}
|
||||
emptyIcon={<FavoriteBorderIcon fontSize="inherit" />}
|
||||
/>
|
||||
<Typography component="legend">10 stars</Typography>
|
||||
<Rating name="customized-10" defaultValue={2} max={10} />
|
||||
</Box>
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user