Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas committed Feb 14, 2025
1 parent b191aa2 commit 9545995
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/theme/Mermaid.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,16 @@ const Mermaid = ({ chart }) => {

useEffect(() => {
// https://mermaid.js.org/config/theming.html#diagram-specific-themes
mermaid.render(
id,
`%%{init: {'theme':'${colorMode === "light" ? "neutral" : "dark"
}'}}%%\n${chart}`,
).then(({ svg }) => {
setSvg(svg)
},)
mermaid
.render(
id,
`%%{init: {'theme':'${
colorMode === "light" ? "neutral" : "dark"
}'}}%%\n${chart}`,
)
.then(({ svg }) => {
setSvg(svg)
})
}, [])

return (
Expand Down

0 comments on commit 9545995

Please sign in to comment.