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.

ProductInfo.jsx 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. import { Button, ButtonGroup, Typography } from '@mui/material';
  2. import { Box } from '@mui/system';
  3. import Image from 'next/image';
  4. import PropType from 'prop-types';
  5. const ProductInfo = ({ bColor, side }) => {
  6. return (
  7. <Box
  8. sx={{
  9. display: 'flex',
  10. flexDirection: 'column',
  11. width: '50%',
  12. maxWidth: '50%',
  13. height: '100%',
  14. pl: side === 'right' ? '10%' : 0,
  15. }}
  16. >
  17. <Typography variant="h3" sx={{ height: 100, mt: 15, color: 'white' }}>
  18. Frapuccino coffee
  19. </Typography>
  20. <Box
  21. sx={{
  22. width: 100,
  23. maxWidth: 100,
  24. height: 60,
  25. }}
  26. >
  27. <Image
  28. src="/images/Stars.svg"
  29. alt="reviews"
  30. width={100}
  31. height={50}
  32. ></Image>
  33. </Box>
  34. <Typography
  35. sx={{
  36. pr: '20%',
  37. color: 'white',
  38. }}
  39. >
  40. If you drink coffee regulary you will know the difference between fresh
  41. coffee and old coffee. Our goal is to provide the freshest coffee beans
  42. in each day.
  43. </Typography>
  44. <Box
  45. sx={{
  46. width: '100%',
  47. display: 'flex',
  48. }}
  49. >
  50. <ButtonGroup
  51. size="small"
  52. aria-label="small outlined button group"
  53. sx={{
  54. height: 50,
  55. mr: 3,
  56. backgroundColor: bColor === 'light' ? '#664c47' : '#8f7772',
  57. color: 'white',
  58. border: 0,
  59. }}
  60. >
  61. <Button
  62. sx={{
  63. color: 'white',
  64. fontSize: 20,
  65. width: 50,
  66. }}
  67. onClick={() => {}}
  68. >
  69. -
  70. </Button>
  71. <Button
  72. sx={{
  73. color: 'white',
  74. fontSize: 17,
  75. width: 50,
  76. }}
  77. >
  78. 1
  79. </Button>
  80. <Button
  81. sx={{
  82. color: 'white',
  83. fontSize: 20,
  84. width: 50,
  85. }}
  86. onClick={() => {}}
  87. >
  88. +
  89. </Button>
  90. </ButtonGroup>
  91. <Button
  92. sx={{
  93. backgroundColor: '#CBA213',
  94. height: 50,
  95. width: 150,
  96. color: 'white',
  97. }}
  98. >
  99. Add to cart
  100. </Button>
  101. </Box>
  102. </Box>
  103. );
  104. };
  105. ProductInfo.propTypes = {
  106. bColor: PropType.string,
  107. side: PropType.string,
  108. };
  109. export default ProductInfo;