import { Badge } from 'antd'; import cx from 'classnames'; import { Link, useLocale } from 'dumi'; import React from 'react'; import { ic } from '../../../../../slots/hooks'; import styles from '../../../index.module.less'; import { DemoCardProps } from '../../../types'; /** * DEMO 的卡片预览 * * @param {DemoCardProps} props 相关参数,详见类型定义 * @returns {React.FC} React.FC * @author YuZhanglong */ export const DemoCard: React.FC = (props) => { const { demo, topicId, exampleId } = props; const locale = useLocale(); const renderCardInternal = () => { const img = demo.screenshot || 'https://gw.alipayobjects.com/os/s/prod/antv/assets/image/screenshot-placeholder-b8e70.png'; return ( <>
); }; return ( {demo.isNew ? ( {renderCardInternal()} ) : ( renderCardInternal() )}

{ic(demo.title)}

); };