Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

OrderSummaryCard.jsx 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import { Button, Divider, Paper, Typography } from '@mui/material';
  2. import { Box } from '@mui/system';
  3. import Image from 'next/image';
  4. import PropType from 'prop-types';
  5. const OrderSummaryCard = ({ data }) => {
  6. return (
  7. <Paper
  8. sx={{ p: 3, width: '100%', mb: 2, backgroundColor: '#f1f1f1' }}
  9. elevation={3}
  10. >
  11. <Typography
  12. sx={{
  13. fontSize: 26,
  14. color: 'primary.main',
  15. textAlign: 'center',
  16. width: '100%',
  17. }}
  18. >
  19. Order Summary
  20. </Typography>
  21. <Typography sx={{ mt: 4 }}>Items total:${data.totalPrice}</Typography>
  22. <Typography sx={{ mt: 1.5 }}>Shipping Costs: FREE</Typography>
  23. <Typography sx={{ mt: 1.5, mb: 1.5 }}>
  24. Total: ${data.totalPrice}
  25. </Typography>
  26. <Divider />
  27. <Box sx={{ textAlign: 'center', mt: 4, width: '100%' }}>
  28. <Button
  29. sx={{
  30. backgroundColor: '#0066ff',
  31. color: 'white',
  32. textTransform: 'none',
  33. px: 2,
  34. }}
  35. startIcon={
  36. <Image src="/images/lock.svg" alt="lock" width={18} height={18} />
  37. }
  38. >
  39. Proceed to Checkout
  40. </Button>
  41. </Box>
  42. <Typography sx={{ mt: 3, fontSize: 13 }}>
  43. Once the checkout process begins you will have an hour to complete your
  44. checkout otherwise you will be returned back to the cart to start over.
  45. </Typography>
  46. </Paper>
  47. );
  48. };
  49. OrderSummaryCard.propTypes = {
  50. data: PropType.shape({
  51. totalPrice: PropType.number,
  52. }),
  53. };
  54. export default OrderSummaryCard;