Skip to content

Commit

Permalink
refactor: type BubbleProps.messageRender
Browse files Browse the repository at this point in the history
  • Loading branch information
YumoImer committed Dec 24, 2024
1 parent 008fcf8 commit 2afd8c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/bubble/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export interface TypingOption {

type SemanticType = 'avatar' | 'content' | 'header' | 'footer';

type BubbleContentType = React.ReactNode | object;

export interface BubbleProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content'> {
prefixCls?: string;
rootClassName?: string;
Expand All @@ -26,8 +28,8 @@ export interface BubbleProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
placement?: 'start' | 'end';
loading?: boolean;
typing?: boolean | TypingOption;
content?: React.ReactNode | object;
messageRender?: (content: string) => React.ReactNode;
content?: BubbleContentType;
messageRender?: (content: BubbleContentType) => React.ReactNode;
loadingRender?: () => React.ReactNode;
variant?: 'filled' | 'borderless' | 'outlined' | 'shadow';
shape?: 'round' | 'corner';
Expand Down

0 comments on commit 2afd8c1

Please sign in to comment.