Skip to content

Commit 10e3cc2

Browse files
authored
docs(bubble): update content and messageRender type (#814)
1 parent a3205c1 commit 10e3cc2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/bubble/index.en-US.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Common props ref:[Common props](/docs/react/common-props)
4343
| --- | --- | --- | --- | --- |
4444
| avatar | Avatar component | React.ReactNode | - | |
4545
| classNames | Semantic DOM class | [Record<SemanticDOM, string>](#semantic-dom) | - | |
46-
| content | Content of bubble | string | - | |
46+
| content | Content of bubble | [BubbleContentType](https://github.com/ant-design/x/blob/d3232c925a0dc61ad763c6664e16f07323ebca4a/components/bubble/interface.ts#L21) | - | |
4747
| footer | Footer content | React.ReactNode \| (content: [BubbleContentType](https://github.com/ant-design/x/blob/d3232c925a0dc61ad763c6664e16f07323ebca4a/components/bubble/interface.ts#L21)) => React.ReactNode | - | |
4848
| header | Header content | React.ReactNode | - | |
4949
| loading | Loading state of Message | boolean | - | |
@@ -53,7 +53,7 @@ Common props ref:[Common props](/docs/react/common-props)
5353
| typing | Show message with typing motion | boolean \| { step?: number, interval?: number } | false | |
5454
| variant | Style variant | `filled` \| `borderless` \| `outlined` \| `shadow` | `filled` | |
5555
| loadingRender | Customize loading content | () => ReactNode | - | |
56-
| messageRender | Customize display content | (content?: string) => ReactNode | - | |
56+
| messageRender | Customize display content | <ContentType extends [BubbleContentType](https://github.com/ant-design/x/blob/d3232c925a0dc61ad763c6664e16f07323ebca4a/components/bubble/interface.ts#L21) = string>(content?: ContentType) => ReactNode | - | |
5757
| onTypingComplete | Callback when typing effect is completed. If typing is not set, it will be triggered immediately when rendering. | () => void | - | |
5858

5959
### Bubble.List

components/bubble/index.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ demo:
4444
| --- | --- | --- | --- | --- |
4545
| avatar | 展示头像 | React.ReactNode | - | |
4646
| classNames | 语义化结构 class | [Record<SemanticDOM, string>](#semantic-dom) | - | |
47-
| content | 聊天内容 | string | - | |
47+
| content | 聊天内容 | [BubbleContentType](https://github.com/ant-design/x/blob/d3232c925a0dc61ad763c6664e16f07323ebca4a/components/bubble/interface.ts#L21) | - | |
4848
| footer | 底部内容 | React.ReactNode \| (content: [BubbleContentType](https://github.com/ant-design/x/blob/d3232c925a0dc61ad763c6664e16f07323ebca4a/components/bubble/interface.ts#L21)) => React.ReactNode | - | |
4949
| header | 头部内容 | React.ReactNode | - | |
5050
| loading | 聊天内容加载状态 | boolean | - | |
@@ -54,7 +54,7 @@ demo:
5454
| typing | 设置聊天内容打字动画 | boolean \| { step?: number, interval?: number } | false | |
5555
| variant | 气泡样式变体 | `filled` \| `borderless` \| `outlined` \| `shadow` | `filled` | |
5656
| loadingRender | 自定义渲染加载态内容 | () => ReactNode | - | |
57-
| messageRender | 自定义渲染内容 | (content?: string) => ReactNode | - | |
57+
| messageRender | 自定义渲染内容 | <ContentType extends [BubbleContentType](https://github.com/ant-design/x/blob/d3232c925a0dc61ad763c6664e16f07323ebca4a/components/bubble/interface.ts#L21) = string>(content?: ContentType) => ReactNode | - | |
5858
| onTypingComplete | 打字效果完成时的回调,如果没有设置 typing 将在渲染时立刻触发 | () => void | - | |
5959

6060
### Bubble.List

0 commit comments

Comments
 (0)