您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ShippingData.jsx 2.0KB

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