Skip to content

Commit

Permalink
🏷️ Feat: add Conversation type export
Browse files Browse the repository at this point in the history
  • Loading branch information
ONLY-yours committed Nov 27, 2024
1 parent 1731062 commit 5a934de
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Binary file modified bun.lockb
Binary file not shown.
15 changes: 9 additions & 6 deletions components/bubble/demo/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ const text = `
Link: [Ant Design X](https://x.ant.design)
`.trim();

const renderMarkdown: BubbleProps['messageRender'] = (content) => (
<Typography>
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: used in demo */}
<div dangerouslySetInnerHTML={{ __html: md.render(content) }} />
</Typography>
);
const renderMarkdown: BubbleProps['messageRender'] = (content) => {
console.log('content', content);
return (
<Typography>
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: used in demo */}
<div dangerouslySetInnerHTML={{ __html: md.render(content) }} />
</Typography>
);
};

const App = () => {
const [renderKey, setRenderKey] = React.useState(0);
Expand Down
2 changes: 1 addition & 1 deletion components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export { default as Bubble } from './bubble';
export type { BubbleProps } from './bubble';

export { default as Conversations } from './conversations';
export type { ConversationsProps } from './conversations';
export type { ConversationsProps, Conversation } from './conversations';

export { default as Prompts } from './prompts';
export type { PromptsProps, PromptProps } from './prompts';
Expand Down

0 comments on commit 5a934de

Please sign in to comment.