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

FeatureItem.tsx 900B

1234567891011121314151617181920212223242526272829303132333435
  1. import { Container, Typography } from '@mui/material';
  2. import { useTranslation } from 'next-i18next';
  3. import Image from 'next/image';
  4. type FeatureItemProps = {
  5. image: string;
  6. alt: string;
  7. description: string;
  8. }
  9. const FeatureItem: React.FC<FeatureItemProps> = ({ image, alt, description }) => {
  10. const { t } = useTranslation('home');
  11. return (
  12. <Container
  13. sx={{
  14. textAlign: 'center',
  15. display: 'flex',
  16. flexDirection: 'column',
  17. marginTop: { xs: '50px' },
  18. }}
  19. >
  20. <Image src={image} alt={alt} width={100} height={100} />
  21. <Typography
  22. sx={{
  23. mt: 6,
  24. px: 6,
  25. }}
  26. >
  27. {t(description)}
  28. </Typography>
  29. </Container>
  30. );
  31. };
  32. export default FeatureItem;