import type { ComponentType } from '../../jsx'; import { Group, Path } from '../../jsx'; import { ItemDesc, ItemIcon, ItemLabel } from '../components'; import { getItemProps } from '../utils'; import { registerItem } from './registry'; import type { BaseItemProps } from './types'; export interface CandyCardLiteProps extends BaseItemProps { width?: number; height?: number; } export const CandyCardLite: ComponentType = (props) => { const [ { indexes, datum, width = 280, height = 140, themeColors }, restProps, ] = getItemProps(props, ['width', 'height']); return ( {/* 主背景卡片 */} {/* 右上角白色装饰区域 */} {/* 主标题 */} {datum.label} {/* 副标题 */} {datum.desc} {/* 右上角插图区域 */} ); }; registerItem('candy-card-lite', { component: CandyCardLite, composites: ['icon', 'label', 'desc'], });