refactor: EventDetailCard 重命名为 EventCard,支持多变体模式
- 新增 EventCard.tsx 组件,支持 variant 属性(detail/compact) - 删除 EventDetailCard.tsx(功能已合并到 EventCard) - EventDetailModal 改用新的 EventCard 组件
This commit is contained in:
@@ -8,7 +8,7 @@ import React from 'react';
|
||||
import { Modal, Space } from 'antd';
|
||||
import type { Dayjs } from 'dayjs';
|
||||
|
||||
import { EventDetailCard } from './EventDetailCard';
|
||||
import { EventCard } from './EventCard';
|
||||
import { EventEmptyState } from './EventEmptyState';
|
||||
import type { InvestmentEvent } from '@/types';
|
||||
|
||||
@@ -82,9 +82,10 @@ export const EventDetailModal: React.FC<EventDetailModalProps> = ({
|
||||
) : (
|
||||
<Space direction="vertical" size={12} style={{ width: '100%' }}>
|
||||
{events.map((event, idx) => (
|
||||
<EventDetailCard
|
||||
<EventCard
|
||||
key={idx}
|
||||
event={event}
|
||||
variant="detail"
|
||||
borderColor={borderColor}
|
||||
secondaryText={secondaryText}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user