import { Card, Cover, Space, Text } from '@stash/ui'
import type { ArticleItem } from '../../data/types'
/**
* 明细页图文卡:上图下文的白卡。
* 传入 onOpen 时整张卡变成按钮,点击进入文章详情。
*/
type CesCardProps = {
item: ArticleItem
onOpen?: (itemId: string) => void
}
export function CesCard({ item, onOpen }: CesCardProps) {
const body = (
{item.title}
{item.desc}
)
return (
onOpen(item.id)}
/>
{onOpen === undefined ? (
{body}
) : (
)}
)
}