UNPKG

@ant-design/x

Version:

Craft AI-driven interfaces effortlessly

39 lines (38 loc) 1.41 kB
import type { ImageProps, SpinProps } from 'antd'; import React from 'react'; declare enum CARD_TYPE { FILE = "file", IMAGE = "image", AUDIO = "audio", VIDEO = "video" } export type SemanticType = 'root' | 'file' | 'icon' | 'name' | 'description'; export type PresetIcons = 'default' | 'excel' | 'image' | 'markdown' | 'pdf' | 'ppt' | 'word' | 'zip' | 'video' | 'audio' | 'java' | 'javascript' | 'python'; export interface FileCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content' | 'onAnimationStart' | 'onAnimationEnd'> { prefixCls?: string; style?: React.CSSProperties; styles?: Partial<Record<SemanticType, React.CSSProperties>>; className?: string; classNames?: Partial<Record<SemanticType, string>>; rootClassName?: string; key?: React.Key; name: string; byte?: number; size?: 'small' | 'default'; description?: React.ReactNode; loading?: boolean; src?: string; mask?: React.ReactNode; icon?: React.ReactNode | PresetIcons; type?: `${CARD_TYPE}`; imageProps?: ImageProps; spinProps?: SpinProps & { showText?: boolean; icon?: React.ReactNode; }; videoProps?: Partial<React.JSX.IntrinsicElements['video']>; audioProps?: Partial<React.JSX.IntrinsicElements['audio']>; onClick?: () => void; } declare const FileCard: React.FC<FileCardProps>; export default FileCard;