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.tsx 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import { Button, Typography } from '@mui/material';
  2. import { Box } from '@mui/system';
  3. import { useTranslation } from 'next-i18next';
  4. const ShippingData = ({ email, address, city, postcode, handleOpen }) => {
  5. const { t } = useTranslation('shipping');
  6. return (
  7. <>
  8. <Box
  9. sx={{
  10. display: 'flex',
  11. justifyContent: 'space-between',
  12. backgroundColor: '#f2f2f2',
  13. alignItems: 'center',
  14. mb: 2,
  15. borderRadius: 2,
  16. p: 1,
  17. }}
  18. >
  19. <Typography sx={{ fontSize: 18, fontWeight: 600 }}>
  20. {t('shipping:contact')}
  21. </Typography>
  22. <Typography>{email}</Typography>
  23. <Button
  24. sx={{
  25. height: 35,
  26. minWidth: { md: 125, xs: 90 },
  27. fontSize: 15,
  28. textTransform: 'none',
  29. backgroundColor: '#CBA213',
  30. color: 'white',
  31. }}
  32. onClick={() => {
  33. handleOpen('Contact');
  34. }}
  35. >
  36. {t('shipping:changeBtn')}
  37. </Button>
  38. </Box>
  39. <Box
  40. sx={{
  41. display: 'flex',
  42. justifyContent: 'space-between',
  43. backgroundColor: '#f2f2f2',
  44. alignItems: 'center',
  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. {t('shipping:shipping')}
  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. {t('shipping:changeBtn')}
  76. </Button>
  77. </Box>
  78. </>
  79. );
  80. };
  81. export default ShippingData;