feat: homets 化 创建类型定义文件

创建常量配置文件
 创建自定义 Hook

 创建组件目录
创建 HeroHeader 组件
创建 FeaturedFeatureCard 组件
创建 FeatureCard 组件
创建新的 HomePage.tsx
This commit is contained in:
zdl
2025-11-25 14:44:46 +08:00
parent 5601e3e389
commit c7efde5154
9 changed files with 640 additions and 379 deletions

View File

@@ -0,0 +1,48 @@
// src/views/Home/components/HeroHeader.tsx
// 首页主标题区域组件
import React from 'react';
import { Heading, Text, VStack } from '@chakra-ui/react';
interface HeroHeaderProps {
headingSize: string | undefined;
headingLetterSpacing: string | undefined;
heroTextSize: string | undefined;
}
/**
* 首页主标题区域组件
* 包含主标题和副标题
*/
export const HeroHeader: React.FC<HeroHeaderProps> = ({
headingSize,
headingLetterSpacing,
heroTextSize
}) => {
return (
<VStack
spacing={{ base: 4, md: 5, lg: 6 }}
textAlign="center"
pt={{ base: 4, md: 6, lg: 8 }}
>
<Heading
size={headingSize}
color="white"
fontWeight="900"
letterSpacing={headingLetterSpacing}
lineHeight="shorter"
>
</Heading>
<Text
fontSize={heroTextSize}
color="whiteAlpha.800"
maxW={{ base: '100%', md: '2xl', lg: '3xl' }}
lineHeight="tall"
px={{ base: 4, md: 0 }}
>
,
</Text>
</VStack>
);
};