Skip to content

Commit

Permalink
Merge pull request #401 from open-rpc/fix/dark-mode-via-params
Browse files Browse the repository at this point in the history
fix: set dark mode via params
  • Loading branch information
shanejonas authored Apr 12, 2020
2 parents 7ac776e + c4dba42 commit 3625458
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ const App: React.FC = () => {
setEditor(ed);
};

useEffect(() => {
monaco.editor.setTheme(UISchema.appBar["ui:darkMode"] ? "vs-dark" : "vs");
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

useEffect(() => {
const defaultExample = examples.find((e) => e.name === "petstore");
if (!defaultValue && !searchUrl && defaultExample) {
Expand Down

0 comments on commit 3625458

Please sign in to comment.