"use client"; import { Copy } from "lucide-react"; import type { ReactNode } from "react"; import { Button, Card, Tag } from "antd"; import { formatPromptDate, type Prompt } from "@/services/api/prompts"; export function PromptCard({ item, onOpen, onCopy, actionLabel = "复制", actionIcon = , actionType = "text", extraAction, }: { item: Prompt; onOpen: () => void; onCopy: () => void; actionLabel?: string; actionIcon?: ReactNode; actionType?: "text" | "primary"; extraAction?: ReactNode; }) { return ( } > {item.title} {formatPromptDate(item.updatedAt)} {item.prompt} {item.tags.map((tag) => ( {tag} ))} {actionLabel} {extraAction} ); }
{item.prompt}