You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ShippingData.jsx 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import { Button, Typography } from '@mui/material';
  2. import { Box } from '@mui/system';
  3. import PropType from 'prop-types';
  4. const ShippingData = ({ email, address, city, postcode, handleOpen }) => {
  5. return (
  6. <>
  7. <Box
  8. sx={{
  9. display: 'flex',
  10. justifyContent: 'space-between',
  11. backgroundColor: '#f2f2f2',
  12. alignItems: 'center',
  13. mt: 2,
  14. ml: 12,
  15. mb: 2,
  16. borderRadius: 2,
  17. p: 1,
  18. }}
  19. >
  20. <Typography sx={{ fontSize: 18, fontWeight: 600 }}>Contact</Typography>
  21. <Typography>{email}</Typography>
  22. <Button
  23. sx={{
  24. height: 35,
  25. minWidth: { md: 125, xs: 90 },
  26. fontSize: 15,
  27. textTransform: 'none',
  28. backgroundColor: '#CBA213',
  29. color: 'white',
  30. }}
  31. onClick={() => {
  32. handleOpen('Contact');
  33. }}
  34. >
  35. Change
  36. </Button>
  37. </Box>
  38. <Box
  39. sx={{
  40. display: 'flex',
  41. justifyContent: 'space-between',
  42. backgroundColor: '#f2f2f2',
  43. alignItems: 'center',
  44. ml: 12,
  45. mb: 2,
  46. borderRadius: 2,
  47. p: 1,
  48. }}
  49. >
  50. <Typography
  51. sx={{
  52. fontSize: { md: 18, xs: 16 },
  53. fontWeight: 600,
  54. mr: { xs: 1, sm: 0 },
  55. }}
  56. >
  57. Shipping to
  58. </Typography>
  59. <Typography>
  60. {address} | {city} | {postcode}
  61. </Typography>
  62. <Button
  63. sx={{
  64. height: 35,
  65. minWidth: { md: 125, xs: 90 },
  66. fontSize: 15,
  67. textTransform: 'none',
  68. backgroundColor: '#CBA213',
  69. color: 'white',
  70. }}
  71. onClick={() => {
  72. handleOpen('Shipping');
  73. }}
  74. >
  75. Change
  76. </Button>
  77. </Box>
  78. </>
  79. );
  80. };
  81. ShippingData.propTypes = {
  82. email: PropType.string,
  83. address: PropType.string,
  84. city: PropType.string,
  85. postcode: PropType.string,
  86. handleOpen: PropType.func,
  87. };
  88. export default ShippingData;