- @chakra-ui/icons → lucide-react - react-icons → lucide-react - IconType → LucideIcon 类型替换 - 涉及 50 个组件文件 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
35 lines
981 B
TypeScript
35 lines
981 B
TypeScript
// src/views/Company/components/DynamicTracking/NewsEventsTab/components/NewsEmptyState.tsx
|
|
// 空状态组件
|
|
|
|
import React, { memo } from 'react';
|
|
import { Center, VStack, Icon, Text } from '@chakra-ui/react';
|
|
import { Newspaper } from 'lucide-react';
|
|
import type { NewsEmptyStateProps } from '../types';
|
|
|
|
const NewsEmptyState: React.FC<NewsEmptyStateProps> = ({
|
|
searchQuery,
|
|
theme,
|
|
isBlackGold,
|
|
}) => {
|
|
return (
|
|
<Center h="400px">
|
|
<VStack spacing={3}>
|
|
<Icon
|
|
as={Newspaper}
|
|
boxSize={16}
|
|
color={isBlackGold ? theme.gold : 'gray.300'}
|
|
opacity={0.5}
|
|
/>
|
|
<Text color={theme.textSecondary} fontSize="lg" fontWeight="medium">
|
|
暂无相关新闻
|
|
</Text>
|
|
<Text fontSize="sm" color={theme.textMuted}>
|
|
{searchQuery ? '尝试修改搜索关键词' : '该公司暂无新闻动态'}
|
|
</Text>
|
|
</VStack>
|
|
</Center>
|
|
);
|
|
};
|
|
|
|
export default memo(NewsEmptyState);
|