Skip to content

docs(bubble): update messageRender type desc and fix typo #1048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/bubble/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Common props ref:[Common props](/docs/react/common-props)
| typing | Show message with typing motion | boolean \| { step?: number, interval?: number } | false | |
| variant | Style variant | `filled` \| `borderless` \| `outlined` \| `shadow` | `filled` | |
| loadingRender | Customize loading content | () => ReactNode | - | |
| messageRender | Customize display content | <ContentType extends [BubbleContentType](https://github.com/ant-design/x/blob/d3232c925a0dc61ad763c6664e16f07323ebca4a/components/bubble/interface.ts#L21) = string>(content?: ContentType) => ReactNode | - | |
| messageRender | Customize display content | <ContentType extends [BubbleContentType](https://github.com/ant-design/x/blob/fc7a000f5ee0c3c75def63d2e47a328486b66465/components/bubble/interface.ts#L21) = string>(content?: ContentType) => ReactNode | - | |
| onTypingComplete | Callback when typing effect is completed. If typing is not set, it will be triggered immediately when rendering. | () => void | - | |

#### ContentType
Expand All @@ -70,7 +70,7 @@ type ContentType = React.ReactNode | AnyObject | string | number;
Custom type usage

```tsx
type CustomContentType {
type CustomContentType = {
...
}

Expand Down
4 changes: 2 additions & 2 deletions components/bubble/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ demo:
| typing | 设置聊天内容打字动画 | boolean \| { step?: number, interval?: number } | false | |
| variant | 气泡样式变体 | `filled` \| `borderless` \| `outlined` \| `shadow` | `filled` | |
| loadingRender | 自定义渲染加载态内容 | () => ReactNode | - | |
| messageRender | 自定义渲染内容 | (content?: ContentType) => ReactNode | - | |
| messageRender | 自定义渲染内容 | <ContentType extends [BubbleContentType](https://github.com/ant-design/x/blob/fc7a000f5ee0c3c75def63d2e47a328486b66465/components/bubble/interface.ts#L21) = string>(content?: ContentType) => ReactNode | - | |
| onTypingComplete | 打字效果完成时的回调,如果没有设置 typing 将在渲染时立刻触发 | () => void | - | |

#### ContentType
Expand All @@ -71,7 +71,7 @@ type ContentType = React.ReactNode | AnyObject | string | number;
自定义类型使用

```tsx
type CustomContentType {
type CustomContentType = {
...
}

Expand Down