Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435
  1. import { Divider, Paper, Typography } from '@mui/material';
  2. import PropType from 'prop-types';
  3. const OrderCard = ({ data }) => {
  4. return (
  5. <Paper
  6. sx={{
  7. p: 3,
  8. width: '100%',
  9. mb: 2,
  10. backgroundColor: '#f2f2f2',
  11. textAlign: { xs: 'center', md: 'left' },
  12. ml: { sm: '10%' },
  13. }}
  14. elevation={3}
  15. >
  16. <Typography sx={{ fontWeight: 600 }}>
  17. Order placed on: {data.date}
  18. </Typography>
  19. <Divider />
  20. <Typography sx={{ mt: 1 }}>By: {data.name}</Typography>
  21. <Typography>Total: ${data.totalPrice.toFixed(2)}</Typography>
  22. </Paper>
  23. );
  24. };
  25. OrderCard.propTypes = {
  26. data: PropType.shape({
  27. date: PropType.string,
  28. name: PropType.string,
  29. totalPrice: PropType.number,
  30. }),
  31. };
  32. export default OrderCard;