Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

OrderCard.jsx 680B

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