fix: update MermaidBlock styles for improved rendering and add foreignObject (#7960)
fix: update MermaidBlock styles for improved rendering and add foreignObject width Co-authored-by: lixiaoyang1992 <lixiaoyang2345@gmail.com>
This commit is contained in:
parent
00a24af571
commit
4dfe1ffc9a
2 changed files with 4 additions and 1 deletions
|
|
@ -141,7 +141,7 @@ export default function MermaidDiagram({ code }: { code: string }) {
|
|||
{!!error ? (
|
||||
<div className="text-error whitespace-pre text-sm">{error}</div>
|
||||
) : (
|
||||
<div className="relative">
|
||||
<div className="mermaid relative">
|
||||
<div className="absolute right-0 z-10 m-2 flex items-center gap-x-1">
|
||||
<ToolTip content={"Zoom In"}>
|
||||
<MagnifyingGlassPlusIcon
|
||||
|
|
|
|||
|
|
@ -1038,3 +1038,6 @@ body[data-color-mode*="light"] {
|
|||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
.mermaid foreignObject {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue