mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-21 03:51:45 +08:00
feat: init @affine/copilot (#2511)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { marked } from 'marked';
|
||||
import { type ReactElement, useMemo } from 'react';
|
||||
|
||||
export interface ConversationProps {
|
||||
text: string;
|
||||
}
|
||||
|
||||
export const Conversation = (props: ConversationProps): ReactElement => {
|
||||
const html = useMemo(() => marked.parse(props.text), [props.text]);
|
||||
return (
|
||||
<div>
|
||||
<div
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: html,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
import { type ReactElement } from 'react';
|
||||
|
||||
export const Divider = (): ReactElement => {
|
||||
return <hr style={{ borderTop: '1px solid #ddd' }} />;
|
||||
};
|
||||
Reference in New Issue
Block a user