EmptyCard.tsx 807 B

123456789101112131415161718192021222324252627282930313233
  1. import { makeStyles, Theme, Typography } from '@material-ui/core';
  2. import { FC } from 'react';
  3. import { EmptyCardProps } from './Types';
  4. const useStyles = makeStyles((theme: Theme) => ({
  5. wrapper: {
  6. backgroundColor: '#fff',
  7. flexDirection: 'column',
  8. },
  9. text: {
  10. marginTop: theme.spacing(4),
  11. fontSize: '36px',
  12. lineHeight: '42px',
  13. color: theme.palette.milvusGrey.dark,
  14. fontWeight: 'bold',
  15. letterSpacing: '-0.02em',
  16. },
  17. }));
  18. const EmptyCard: FC<EmptyCardProps> = ({ icon, text, wrapperClass = '' }) => {
  19. const classes = useStyles();
  20. return (
  21. <section
  22. className={`flex-center card-wrapper ${classes.wrapper} ${wrapperClass}`}
  23. >
  24. {icon}
  25. <Typography className={classes.text}>{text}</Typography>
  26. </section>
  27. );
  28. };
  29. export default EmptyCard;