Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
trishaprile committed Oct 25, 2024
2 parents 812379b + 02bf11a commit 93560ca
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ endif

build:
@echo USE_LEGACY=$(USE_LEGACY)
docker build --platform linux/amd64 -t markdown $(dockerfile) --build-arg REACT_VERSION=${REACT_VERSION} .
docker build -t markdown $(dockerfile) --build-arg REACT_VERSION=${REACT_VERSION} .

# This lets us call `make run test.browser`. Make expects cmdline args
# to be targets. So this creates noop targets out of args. Copied from
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/Code/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

pre.mermaid {
&_single {
background: var(--color-bg-page, white);
background: none;
}
}

Expand Down
19 changes: 10 additions & 9 deletions components/CodeTabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@ import React, { useEffect } from 'react';

let mermaid: Mermaid;

if (typeof window !== 'undefined') {
import('mermaid').then(module => {
mermaid = module.default;
});
}

const CodeTabs = props => {
const { children, theme } = props;

// set Mermaid theme
// render Mermaid diagram
useEffect(() => {
mermaid?.initialize({
theme: theme === 'dark' ? 'dark' : 'default',
});
if (typeof window !== 'undefined') {
import('mermaid').then(module => {
mermaid = module.default;
mermaid.initialize({
theme: theme === 'dark' ? 'dark' : 'default',
});
mermaid.contentLoaded();
});
}
}, [theme]);

function handleClick({ target }, index: number) {
Expand Down

0 comments on commit 93560ca

Please sign in to comment.