Skip to content

Commit c9afc66

Browse files
authored
fix: setMermaidError prop (#730)
1 parent 1f6c148 commit c9afc66

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/Code.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ type CodeProps = Omit<CardProps, 'children'> & {
4848
title?: ReactNode
4949
onSelectedTabChange?: (key: string) => void
5050
isStreaming?: boolean // currently just used to block mermaid from rendering mid-stream, but might have other uses later on
51+
setMermaidError?: (error: Nullable<Error>) => void
5152
}
5253

5354
type TabInterfaceT = 'tabs' | 'dropdown'
@@ -432,6 +433,7 @@ function CodeUnstyled({
432433
title,
433434
onSelectedTabChange,
434435
isStreaming = false,
436+
setMermaidError,
435437
...props
436438
}: CodeProps) {
437439
const parentFillLevel = useFillLevel()
@@ -523,6 +525,7 @@ function CodeUnstyled({
523525
showLineNumbers={showLineNumbers}
524526
hasSetHeight={hasSetHeight}
525527
isStreaming={isStreaming}
528+
setMermaidError={setMermaidError}
526529
>
527530
{tab.content}
528531
</CodeContent>
@@ -539,6 +542,7 @@ function CodeUnstyled({
539542
showLineNumbers={showLineNumbers}
540543
hasSetHeight={hasSetHeight}
541544
isStreaming={isStreaming}
545+
setMermaidError={setMermaidError}
542546
>
543547
{children}
544548
</CodeContent>

0 commit comments

Comments
 (0)