-
-
Notifications
You must be signed in to change notification settings - Fork 454
/
Copy pathinterface.ts
38 lines (35 loc) · 1.02 KB
/
interface.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import type { AvatarProps } from 'antd';
export interface TypingOption {
/**
* @default 1
*/
step?: number;
/**
* @default 50
*/
interval?: number;
/**
* @default null
*/
suffix?: React.ReactNode;
}
type SemanticType = 'avatar' | 'content' | 'header' | 'footer' | 'extra';
export interface BubbleProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content'> {
prefixCls?: string;
rootClassName?: string;
styles?: Partial<Record<SemanticType, React.CSSProperties>>;
classNames?: Partial<Record<SemanticType, string>>;
avatar?: AvatarProps | React.ReactElement;
placement?: 'start' | 'end';
loading?: boolean;
typing?: boolean | TypingOption;
content?: React.ReactNode | object;
messageRender?: (content: string) => React.ReactNode;
loadingRender?: () => React.ReactNode;
variant?: 'filled' | 'borderless' | 'outlined' | 'shadow';
shape?: 'round' | 'corner';
onTypingComplete?: VoidFunction;
header?: React.ReactNode;
footer?: React.ReactNode;
extra?: React.ReactNode;
}