Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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