@@ -7,11 +7,8 @@ import Tree from 'react-d3-tree';
7
7
import Props from './Props' ;
8
8
import HtmlAttr from './HtmlAttr' ;
9
9
import CodePreview from './CodePreview' ;
10
- import Switch from '@material-ui/core/Switch' ;
11
10
import { ComponentsInt , PropsInt } from '../../interfaces/Interfaces' ;
12
11
import Box from '@material-ui/core/Box' ;
13
- import FormGroup from '@material-ui/core/FormGroup' ;
14
- import FormControlLabel from '@material-ui/core/FormControlLabel' ;
15
12
16
13
interface BottomTabsPropsInt extends PropsInt {
17
14
deleteProp ( id : number ) : void ;
@@ -30,70 +27,6 @@ interface StateInt {
30
27
translate : { x : number ; y : number } ;
31
28
}
32
29
33
- const styles = ( theme : Theme ) : any => ( {
34
- root : {
35
- flexGrow : 1 ,
36
- backgroundColor : '#333333' ,
37
- height : '100%' ,
38
- color : '#fff' ,
39
- boxShadow : '0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23)'
40
- } ,
41
- bottomHeader : {
42
- flex : 1 ,
43
- flexDirection : 'row' ,
44
- alignItems : 'center' ,
45
- Width : '200px'
46
- } ,
47
- tabsRoot : {
48
- borderBottom : '0.5px solid #424242'
49
- } ,
50
- tabsIndicator : {
51
- backgroundColor : '#1de9b6'
52
- } ,
53
- tabRoot : {
54
- textTransform : 'initial' ,
55
- minWidth : 40 ,
56
- fontWeight : theme . typography . fontWeightRegular ,
57
- // marginRight: theme.spacing.unit * 4,
58
- marginRight : theme . spacing ( 4 ) , // JZ: updated syntax as per deprecation warning
59
-
60
- fontFamily : [
61
- '-apple-system' ,
62
- 'BlinkMacSystemFont' ,
63
- '"Segoe UI"' ,
64
- 'Roboto' ,
65
- '"Helvetica Neue"' ,
66
- 'Arial' ,
67
- 'sans-serif' ,
68
- '"Apple Color Emoji"' ,
69
- '"Segoe UI Emoji"' ,
70
- '"Segoe UI Symbol"'
71
- ] . join ( ',' ) ,
72
- '&:hover' : {
73
- color : '#1de9b6' ,
74
- opacity : 1
75
- } ,
76
- '&$tabSelected' : {
77
- color : '#33eb91' ,
78
- fontWeight : theme . typography . fontWeightMedium
79
- } ,
80
- '&:focus' : {
81
- color : '#4aedc4'
82
- }
83
- } ,
84
- tabSelected : { } ,
85
- typography : {
86
- padding : theme . spacing ( 3 ) // JZ: updated syntax as per deprecation warning
87
- } ,
88
- padding : {
89
- padding : `0 ${ theme . spacing ( 2 ) } px` // JZ: updated syntax as per deprecation warning
90
- } ,
91
- switch : {
92
- marginRight : '10px' ,
93
- marginTop : '2px'
94
- }
95
- } ) ;
96
-
97
30
class BottomTabs extends Component < BottomTabsPropsInt , StateInt > {
98
31
constructor ( props : BottomTabsPropsInt ) {
99
32
super ( props ) ;
@@ -103,6 +36,7 @@ class BottomTabs extends Component<BottomTabsPropsInt, StateInt> {
103
36
} ;
104
37
}
105
38
treeWrapper : HTMLDivElement ;
39
+
106
40
componentDidMount ( ) {
107
41
// dynamically center the tree based on the div size
108
42
const dimensions = this . treeWrapper . getBoundingClientRect ( ) ;
@@ -209,31 +143,7 @@ class BottomTabs extends Component<BottomTabsPropsInt, StateInt> {
209
143
htmlAttribCount ? `(${ htmlAttribCount } )` : ''
210
144
} `}
211
145
/>
212
- { /* <Tab
213
- disableRipple
214
- classes={{ root: classes.tabRoot, selected: classes.tabSelected }}
215
- label="Add Child Props"
216
- /> */ }
217
146
</ Tabs >
218
- {
219
- // REACT NATIVE TOGGLE REMOVED AND MOVED TO LEFTCONTAINER. REMOVE THIS CODE IF NO ADVERSE EFFECTS FOUND
220
- /* <FormGroup>
221
- <FormControlLabel
222
- className={classes.switch}
223
- control={
224
- <Switch
225
- checked={native}
226
- color="primary"
227
- onChange={() => {
228
- toggleNative();
229
- }}
230
- />
231
- }
232
- label="Native Mode"
233
- labelPlacement="start"
234
- />
235
- </FormGroup> */
236
- }
237
147
</ Box >
238
148
{ value === 0 && (
239
149
< div
@@ -292,4 +202,67 @@ class BottomTabs extends Component<BottomTabsPropsInt, StateInt> {
292
202
}
293
203
}
294
204
205
+ const styles = ( theme : Theme ) : any => ( {
206
+ root : {
207
+ flexGrow : 1 ,
208
+ backgroundColor : '#333333' ,
209
+ height : '100%' ,
210
+ color : '#fff' ,
211
+ boxShadow : '0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23)'
212
+ } ,
213
+ bottomHeader : {
214
+ flex : 1 ,
215
+ flexDirection : 'row' ,
216
+ alignItems : 'center' ,
217
+ Width : '200px'
218
+ } ,
219
+ tabsRoot : {
220
+ borderBottom : '0.5px solid #424242'
221
+ } ,
222
+ tabsIndicator : {
223
+ backgroundColor : '#1de9b6'
224
+ } ,
225
+ tabRoot : {
226
+ textTransform : 'initial' ,
227
+ minWidth : 40 ,
228
+ fontWeight : theme . typography . fontWeightRegular ,
229
+ marginRight : theme . spacing ( 4 ) , // JZ: updated syntax as per deprecation warning
230
+
231
+ fontFamily : [
232
+ '-apple-system' ,
233
+ 'BlinkMacSystemFont' ,
234
+ '"Segoe UI"' ,
235
+ 'Roboto' ,
236
+ '"Helvetica Neue"' ,
237
+ 'Arial' ,
238
+ 'sans-serif' ,
239
+ '"Apple Color Emoji"' ,
240
+ '"Segoe UI Emoji"' ,
241
+ '"Segoe UI Symbol"'
242
+ ] . join ( ',' ) ,
243
+ '&:hover' : {
244
+ color : '#1de9b6' ,
245
+ opacity : 1
246
+ } ,
247
+ '&$tabSelected' : {
248
+ color : '#33eb91' ,
249
+ fontWeight : theme . typography . fontWeightMedium
250
+ } ,
251
+ '&:focus' : {
252
+ color : '#4aedc4'
253
+ }
254
+ } ,
255
+ tabSelected : { } ,
256
+ typography : {
257
+ padding : theme . spacing ( 3 ) // JZ: updated syntax as per deprecation warning
258
+ } ,
259
+ padding : {
260
+ padding : `0 ${ theme . spacing ( 2 ) } px` // JZ: updated syntax as per deprecation warning
261
+ } ,
262
+ switch : {
263
+ marginRight : '10px' ,
264
+ marginTop : '2px'
265
+ }
266
+ } ) ;
267
+
295
268
export default withStyles ( styles ) ( BottomTabs ) ;
0 commit comments