UNPKG

1.8 kBTypeScriptView Raw
1import * as React from 'react';
2import type { Tab } from 'rc-tabs/lib/interface';
3import type { TabsProps } from '../tabs';
4export type CardType = 'inner';
5export type CardSize = 'default' | 'small';
6export interface CardTabListType extends Omit<Tab, 'label'> {
7 key: string;
8 /** @deprecated Please use `label` instead */
9 tab?: React.ReactNode;
10 label?: React.ReactNode;
11}
12export interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
13 prefixCls?: string;
14 title?: React.ReactNode;
15 extra?: React.ReactNode;
16 bordered?: boolean;
17 /** @deprecated Please use `styles.header` instead */
18 headStyle?: React.CSSProperties;
19 /** @deprecated Please use `styles.body` instead */
20 bodyStyle?: React.CSSProperties;
21 style?: React.CSSProperties;
22 loading?: boolean;
23 hoverable?: boolean;
24 children?: React.ReactNode;
25 id?: string;
26 className?: string;
27 rootClassName?: string;
28 size?: CardSize;
29 type?: CardType;
30 cover?: React.ReactNode;
31 actions?: React.ReactNode[];
32 tabList?: CardTabListType[];
33 tabBarExtraContent?: React.ReactNode;
34 onTabChange?: (key: string) => void;
35 activeTabKey?: string;
36 defaultActiveTabKey?: string;
37 tabProps?: TabsProps;
38 classNames?: {
39 header?: string;
40 body?: string;
41 extra?: string;
42 title?: string;
43 actions?: string;
44 cover?: string;
45 };
46 styles?: {
47 header?: React.CSSProperties;
48 body?: React.CSSProperties;
49 extra?: React.CSSProperties;
50 title?: React.CSSProperties;
51 actions?: React.CSSProperties;
52 cover?: React.CSSProperties;
53 };
54}
55declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
56export default Card;