import { Code,CreditCard,FileText,Image as ImageIcon } from 'lucide-react'; import React from 'react'; import type { Card } from '../api'; // CardIconProps 描述库存图标所需的卡密类型参数。 interface CardIconProps { // type 是当前卡密组的交付类型。 type: Card['type']; } // CardIcon 根据卡密类型渲染稳定的库存图标,避免在列表组件内声明子组件。 export const CardIcon: React.FC = ({ type }) => { switch (type) { case 'text': return ; case 'image': return ; case 'api': return ; default: return ; } };