mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-01 11:56:25 +02:00
feat: add custom callout component to MarkdownViewer for enhanced styling
This commit is contained in:
parent
25b9118306
commit
6622a8c582
1 changed files with 8 additions and 0 deletions
|
|
@ -10,6 +10,14 @@ interface MarkdownViewerProps {
|
|||
export function MarkdownViewer({ content, className }: MarkdownViewerProps) {
|
||||
const components: StreamdownProps["components"] = {
|
||||
// Define custom components for markdown elements
|
||||
callout: ({ children, ...props }) => (
|
||||
<div
|
||||
className="my-4 rounded-lg border border-blue-200 bg-blue-50 p-4 dark:border-blue-800 dark:bg-blue-950"
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
),
|
||||
p: ({ children, ...props }) => (
|
||||
<p className="my-2" {...props}>
|
||||
{children}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue