clean up code

This commit is contained in:
[poww10s]
2020-09-08 03:45:06 -04:00
parent 73fd504d58
commit 31a2f3dcf6
6 changed files with 236 additions and 226 deletions
+39
View File
@@ -0,0 +1,39 @@
import React from "react";
import { NameInput } from "./InputComponents.js";
import { createMuiTheme, ThemeProvider } from "@material-ui/styles";
import Box from "@material-ui/core/Box";
import { deepPurple } from "@material-ui/core/colors";
const theme = createMuiTheme({
palette: {
primary: {
main: deepPurple[400],
},
secondary: {},
},
});
function EditorComponent(props) {
const patch = props.patch;
if (!props.show) {
return null;
}
return (
// placeholder div
<ThemeProvider theme={theme}>
<Box bgcolor="primary">
<NameInput
returnName={(name) => {
let copyPatch = JSON.parse(JSON.stringify(patch));
copyPatch.name = name;
props.updatePatch(copyPatch);
}}
/>
</Box>
</ThemeProvider>
);
}
export default EditorComponent;