First Commit
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
// @mui
|
||||
import Chip from '@mui/material/Chip';
|
||||
import Stack from '@mui/material/Stack';
|
||||
import Typography from '@mui/material/Typography';
|
||||
|
||||
// @project
|
||||
import MainCard from '@/components/MainCard';
|
||||
|
||||
/*************************** CARD - OVERVIEW ***************************/
|
||||
|
||||
export default function OverviewCard({ title, value, chip, compare, cardProps }) {
|
||||
const chipDefaultProps = { color: 'success', variant: 'text', size: 'small' };
|
||||
|
||||
return (
|
||||
<MainCard {...cardProps}>
|
||||
<Stack sx={{ gap: { xs: 3, md: 4 } }}>
|
||||
<Typography variant="subtitle1">{title}</Typography>
|
||||
<Stack sx={{ gap: 0.5 }}>
|
||||
<Stack direction="row" sx={{ gap: 1, alignItems: 'center' }}>
|
||||
<Typography variant="h4">{value}</Typography>
|
||||
<Chip {...{ ...chipDefaultProps, ...chip }} />
|
||||
</Stack>
|
||||
<Typography variant="caption" color="grey.700">
|
||||
{compare}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</MainCard>
|
||||
);
|
||||
}
|
||||
|
||||
OverviewCard.propTypes = {
|
||||
title: PropTypes.string,
|
||||
value: PropTypes.string,
|
||||
chip: PropTypes.any,
|
||||
compare: PropTypes.string,
|
||||
cardProps: PropTypes.any
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
// @mui
|
||||
import Stack from '@mui/material/Stack';
|
||||
import Typography from '@mui/material/Typography';
|
||||
|
||||
// @project
|
||||
import MainCard from '@/components/MainCard';
|
||||
|
||||
/*************************** PRESENTATION CARD ***************************/
|
||||
|
||||
export default function PresentationCard({ title, children }) {
|
||||
return (
|
||||
<MainCard>
|
||||
<Stack sx={{ gap: 3.25 }}>
|
||||
<Typography variant="h6" sx={{ fontWeight: 400 }}>
|
||||
{title}
|
||||
</Typography>
|
||||
{children}
|
||||
</Stack>
|
||||
</MainCard>
|
||||
);
|
||||
}
|
||||
|
||||
PresentationCard.propTypes = { title: PropTypes.string, children: PropTypes.any };
|
||||
@@ -0,0 +1,24 @@
|
||||
import PropTypes from 'prop-types';
|
||||
// @mui
|
||||
import LinearProgress from '@mui/material/LinearProgress';
|
||||
import Stack from '@mui/material/Stack';
|
||||
import Typography from '@mui/material/Typography';
|
||||
|
||||
// @project
|
||||
import { LinearProgressType } from '@/enum';
|
||||
|
||||
/*************************** CARD - PROGRESS ***************************/
|
||||
|
||||
export default function ProgressCard({ title, value, progress }) {
|
||||
return (
|
||||
<Stack sx={{ gap: 0.5 }}>
|
||||
<Stack direction="row" sx={{ alignItems: 'center', justifyContent: 'space-between' }}>
|
||||
<Typography variant="body2">{title}</Typography>
|
||||
<Typography variant="subtitle1">{value}</Typography>
|
||||
</Stack>
|
||||
<LinearProgress variant="determinate" type={LinearProgressType.LIGHT} {...progress} aria-label="progress" />
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
ProgressCard.propTypes = { title: PropTypes.string, value: PropTypes.string, progress: PropTypes.any };
|
||||
Reference in New Issue
Block a user