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

DataDetailsCard.jsx 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import Card from '@mui/material/Card';
  2. import CardContent from '@mui/material/CardContent';
  3. import Typography from '@mui/material/Typography';
  4. import Image from 'next/image';
  5. import PropType from 'prop-types';
  6. const DataDetailsCard = ({ data }) => {
  7. return (
  8. <Card
  9. sx={{
  10. maxWidth: 600,
  11. height: 200,
  12. marginX: 'auto',
  13. marginY: 20,
  14. boxShadow: 10,
  15. display: 'flex',
  16. }}
  17. >
  18. <Image
  19. src="https://www.business2community.com/wp-content/uploads/2017/08/blank-profile-picture-973460_640.png"
  20. alt="profile picture"
  21. width={600}
  22. height={500}
  23. />
  24. <CardContent>
  25. <Typography
  26. gutterBottom
  27. variant="h5"
  28. component="div"
  29. sx={{
  30. textAlign: 'center',
  31. marginTop: 1,
  32. marginBottom: 3,
  33. }}
  34. >
  35. {data.name}, {data.age}
  36. </Typography>
  37. <Typography variant="body2" color="text.secondary">
  38. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur
  39. quis odio in libero fringilla pellentesque aliquet et mi. Quisque
  40. maximus lectus a neque luctus, tempus auctor ipsum ultrices.
  41. </Typography>
  42. </CardContent>
  43. </Card>
  44. );
  45. };
  46. DataDetailsCard.propTypes = {
  47. data: PropType.shape({
  48. name: PropType.string,
  49. gender: PropType.string,
  50. }),
  51. };
  52. export default DataDetailsCard;