Download react-admin-dashboard/src/components/StatBox.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-admin-dashboard/src/components/StatBox.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-admin-dashboard/src/components/StatBox.jsx
-
curl -L -o StatBox.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-admin-dashboard/src/components/StatBox.jsx
1.12 kB
| import { Box, Typography, useTheme } from "@mui/material"; | |
| import { tokens } from "../theme"; | |
| import ProgressCircle from "./ProgressCircle"; | |
| const StatBox = ({ title, subtitle, icon, progress, increase }) => { | |
| const theme = useTheme(); | |
| const colors = tokens(theme.palette.mode); | |
| return ( | |
| <Box width="100%" m="0 30px"> | |
| <Box display="flex" justifyContent="space-between"> | |
| <Box> | |
| {icon} | |
| <Typography | |
| variant="h4" | |
| fontWeight="bold" | |
| sx={{ color: colors.grey[100] }} | |
| > | |
| {title} | |
| </Typography> | |
| </Box> | |
| <Box> | |
| <ProgressCircle progress={progress} /> | |
| </Box> | |
| </Box> | |
| <Box display="flex" justifyContent="space-between" mt="2px"> | |
| <Typography variant="h5" sx={{ color: colors.greenAccent[500] }}> | |
| {subtitle} | |
| </Typography> | |
| <Typography | |
| variant="h5" | |
| fontStyle="italic" | |
| sx={{ color: colors.greenAccent[600] }} | |
| > | |
| {increase} | |
| </Typography> | |
| </Box> | |
| </Box> | |
| ); | |
| }; | |
| export default StatBox; | |