UNPKG

1.34 kBTypeScriptView Raw
1import * as React from 'react';
2import Grid from './Grid';
3import Meta from './Meta';
4import { TabsProps } from '../tabs';
5import { Omit } from '../_util/type';
6export { CardGridProps } from './Grid';
7export { CardMetaProps } from './Meta';
8export declare type CardType = 'inner';
9export declare type CardSize = 'default' | 'small';
10export interface CardTabListType {
11 key: string;
12 tab: React.ReactNode;
13 disabled?: boolean;
14}
15export interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
16 prefixCls?: string;
17 title?: React.ReactNode;
18 extra?: React.ReactNode;
19 bordered?: boolean;
20 headStyle?: React.CSSProperties;
21 bodyStyle?: React.CSSProperties;
22 style?: React.CSSProperties;
23 loading?: boolean;
24 hoverable?: boolean;
25 children?: React.ReactNode;
26 id?: string;
27 className?: string;
28 size?: CardSize;
29 type?: CardType;
30 cover?: React.ReactNode;
31 actions?: React.ReactNode[];
32 tabList?: CardTabListType[];
33 tabBarExtraContent?: React.ReactNode | null;
34 onTabChange?: (key: string) => void;
35 activeTabKey?: string;
36 defaultActiveTabKey?: string;
37 tabProps?: TabsProps;
38}
39export interface CardInterface extends React.FC<CardProps> {
40 Grid: typeof Grid;
41 Meta: typeof Meta;
42}
43declare const Card: CardInterface;
44export default Card;