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

ShippingData.jsx 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. width: '90%',
  17. borderRadius: 2,
  18. p: 1,
  19. }}
  20. >
  21. <Typography sx={{ fontSize: 18, fontWeight: 600 }}>Contact</Typography>
  22. <Typography>{email}</Typography>
  23. <Button
  24. sx={{
  25. height: 35,
  26. width: 125,
  27. fontSize: 15,
  28. textTransform: 'none',
  29. backgroundColor: '#CBA213',
  30. color: 'white',
  31. }}
  32. onClick={() => {
  33. handleOpen('Contact');
  34. }}
  35. >
  36. Change
  37. </Button>
  38. </Box>
  39. <Box
  40. sx={{
  41. display: 'flex',
  42. justifyContent: 'space-between',
  43. backgroundColor: '#f2f2f2',
  44. alignItems: 'center',
  45. ml: 12,
  46. mb: 2,
  47. width: '90%',
  48. borderRadius: 2,
  49. p: 1,
  50. }}
  51. >
  52. <Typography sx={{ fontSize: 18, fontWeight: 600 }}>
  53. Shipping to
  54. </Typography>
  55. <Typography>
  56. {address} | {city} | {postcode}
  57. </Typography>
  58. <Button
  59. sx={{
  60. height: 35,
  61. width: 125,
  62. fontSize: 15,
  63. textTransform: 'none',
  64. backgroundColor: '#CBA213',
  65. color: 'white',
  66. }}
  67. onClick={() => {
  68. handleOpen('Shipping');
  69. }}
  70. >
  71. Change
  72. </Button>
  73. </Box>
  74. </>
  75. );
  76. };
  77. ShippingData.propTypes = {
  78. email: PropType.string,
  79. address: PropType.string,
  80. city: PropType.string,
  81. postcode: PropType.string,
  82. handleOpen: PropType.func,
  83. };
  84. export default ShippingData;