small screen script editor

This commit is contained in:
Olivier Gagnon 2021-10-15 15:47:17 -04:00
parent 515f9e5d4b
commit f645d08a50
3 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -315,7 +315,7 @@ export function Root(props: IProps): React.ReactElement {
monaco.languages.typescript.typescriptDefaults.addExtraLib(libSource, "netscript.d.ts");
loadThemes(monaco);
}
const h = window.innerHeight;
return (
<>
<Box display="flex" flexDirection="row" alignItems="center">
@ -337,7 +337,7 @@ export function Root(props: IProps): React.ReactElement {
beforeMount={beforeMount}
onMount={onMount}
loading={<Typography>Loading script editor!</Typography>}
height="90%"
height={90 - h / 100 + "%"}
defaultLanguage="javascript"
defaultValue={code}
onChange={updateCode}