learned and implemented default props

This commit is contained in:
Olivier Gagnon
2021-09-29 01:49:22 -04:00
parent b0739f8942
commit c5713fa6d8
41 changed files with 137 additions and 280 deletions
+1 -6
View File
@@ -32,12 +32,7 @@ export function OptionsModal(props: IProps): React.ReactElement {
<Modal open={props.open} onClose={props.onClose}>
<Box display="flex" flexDirection="row" alignItems="center">
<Typography>Theme: </Typography>
<Select
variant="standard"
color="primary"
onChange={(event) => setTheme(event.target.value)}
defaultValue={props.options.theme}
>
<Select onChange={(event) => setTheme(event.target.value)} defaultValue={props.options.theme}>
<MenuItem value="vs-dark">dark</MenuItem>
<MenuItem value="light">light</MenuItem>
</Select>
+1 -1
View File
@@ -296,7 +296,7 @@ export function Root(props: IProps): React.ReactElement {
<>
<Box display="flex" flexDirection="row" alignItems="center">
<Typography>Script name: </Typography>
<TextField variant="standard" type="text" tabIndex={1} value={filename} onChange={onFilenameChange} />
<TextField type="text" tabIndex={1} value={filename} onChange={onFilenameChange} />
<IconButton onClick={() => setOptionsOpen(true)}>
<>
<SettingsIcon />