File tree Expand file tree Collapse file tree 7 files changed +73
-28
lines changed Expand file tree Collapse file tree 7 files changed +73
-28
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import CodePreview from './CodePreview';
7
7
import StylesEditor from './StylesEditor' ;
8
8
import CustomizationPanel from '../../containers/CustomizationPanel'
9
9
import CreationPanel from './CreationPanel'
10
- import ContextManager from './ContexManager '
10
+ import ContextManager from './ContextManager '
11
11
import Box from '@material-ui/core/Box' ;
12
12
import Tree from '../../tree/TreeChart' ;
13
13
import FormControl from '@material-ui/core/FormControl' ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import ContextAssigner from 'app/src/components/right/ContextAssigner.tsx' ;
Original file line number Diff line number Diff line change
1
+ import React , { useContext } from 'react' ;
2
+ import ComponentPanel from '../right/ComponentPanel' ;
3
+ import ContextAssigner from '../right/ContextAssigner' ;
4
+ import ContextMenu from '../right/ContextMenu' ;
5
+ import ContextTree from '../right/ContextTree' ;
6
+ import HTMLPanel from '../left/HTMLPanel' ;
7
+ import { styleContext } from '../../containers/AppContainer' ;
8
+ import CssBaseline from '@mui/material/CssBaseline' ;
9
+ import Box from '@mui/material/Box' ;
10
+ import Container from '@mui/material/Container' ;
11
+ import { styled } from '@mui/material/styles' ;
12
+
13
+
14
+
15
+ const ContextManager = ( props ) : JSX . Element => {
16
+ // const {style} = useContext(styleContext);
17
+ return (
18
+ < React . Fragment >
19
+ { /* <CssBaseline /> */ }
20
+ < Container style = { { "backgroundColor" : "white" , "height" : "100%" , "width" : "100%" } } >
21
+ < Box display = "grid" gridTemplateColumns = "repeat(12, 1fr)" gap = { 0 } >
22
+ < Box gridColumn = "span 4" style = { { "border" : "1px solid black" , "height" : "100%" } } >
23
+ < Box style = { { "height" : "50em" , "border" : "1px solid black" } } >
24
+ < ContextMenu />
25
+ </ Box >
26
+ < Box style = { { "height" : "50em" , "border" : "1px solid black" } } >
27
+ < ContextAssigner />
28
+ </ Box >
29
+ </ Box >
30
+ < Box gridColumn = "span 8" style = { { "border" : "1px solid black" } } >
31
+ < ContextTree />
32
+ </ Box >
33
+ </ Box >
34
+ </ Container >
35
+ </ React . Fragment >
36
+
37
+ ) ;
38
+ } ;
39
+
40
+ export default ContextManager ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import FormControl from '@mui/material/FormControl';
6
6
import Select , { SelectChangeEvent } from '@mui/material/Select' ;
7
7
import StateContext from '../../context/context' ;
8
8
9
- export default function ComponentDropDown ( ) {
9
+ export default function ContextAssigner ( ) {
10
10
const [ age , setAge ] = React . useState ( '' ) ;
11
11
const [ componentList , dispatch ] = React . useContext ( StateContext ) ;
12
12
@@ -16,22 +16,22 @@ export default function ComponentDropDown() {
16
16
} ;
17
17
18
18
return (
19
- < Box sx = { { minWidth : 120 } } >
19
+
20
+ < Box sx = { { minWidth :100 } } >
20
21
< FormControl fullWidth >
21
- < InputLabel id = "demo-simple-select-label" > Age </ InputLabel >
22
+ < InputLabel id = "demo-simple-select-label" > Select Component </ InputLabel >
22
23
< Select
23
24
labelId = "demo-simple-select-label"
24
25
id = "demo-simple-select"
25
26
value = { age }
26
27
label = "Age"
27
28
onChange = { handleChange }
28
29
>
29
- < MenuItem value = { 10 } > Ten </ MenuItem >
30
- < MenuItem value = { 20 } > Twenty </ MenuItem >
31
- < MenuItem value = { 30 } > Thirty </ MenuItem >
30
+ { componentList . components . map ( ( component ) => {
31
+ return < MenuItem value = { component . name } > { component . name } </ MenuItem >
32
+ } ) }
32
33
</ Select >
33
34
</ FormControl >
34
35
</ Box >
35
36
) ;
36
- }
37
-
37
+ }
Original file line number Diff line number Diff line change
1
+ /* imput component
2
+ input component
3
+ button component
4
+ */
5
+ import React from 'react' ;
6
+
7
+
8
+ const ContextMenu = ( ) => {
9
+ return (
10
+ < h1 > This is from context menu</ h1 >
11
+ )
12
+ }
13
+
14
+ export default ContextMenu ;
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+
3
+ const ContextTree = ( ) => {
4
+ return (
5
+ < h1 > Our beautiful tree is here</ h1 >
6
+ )
7
+ }
8
+
9
+ export default ContextTree ;
You can’t perform that action at this time.
0 commit comments