better markdown styling

pull/228/head
Alex 1 year ago
parent 6cadddc2fc
commit 7f56f57778

@ -22,6 +22,16 @@ const ConversationBubble = forwardRef<
ref,
) {
const [showFeedback, setShowFeedback] = useState(false);
const List = ({
ordered,
children,
}: {
ordered?: boolean;
children: React.ReactNode;
}) => {
const Tag = ordered ? 'ol' : 'ul';
return <Tag className="list-inside list-disc">{children}</Tag>;
};
let bubble;
if (type === 'QUESTION') {
@ -75,6 +85,12 @@ const ConversationBubble = forwardRef<
</code>
);
},
ul({ node, children }) {
return <List>{children}</List>;
},
ol({ node, children }) {
return <List ordered>{children}</List>;
},
}}
>
{message}

Loading…
Cancel
Save