Skip to content

Commit

Permalink
fix: set dark mode via params
Browse files Browse the repository at this point in the history
fixes #400
  • Loading branch information
shanejonas committed Apr 12, 2020
1 parent 7ac776e commit c4dba42
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 c4dba42

Please sign in to comment.