@@ -7,7 +7,12 @@ 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 { ComponentInt , ComponentsInt , PropInt , PropsInt } from '../utils/Interfaces' ;
10
+ import {
11
+ ComponentInt ,
12
+ ComponentsInt ,
13
+ PropInt ,
14
+ PropsInt
15
+ } from '../utils/Interfaces' ;
11
16
12
17
interface BottomTabsPropsInt extends PropsInt {
13
18
deleteProp ( id : number ) : void ;
@@ -109,7 +114,9 @@ class BottomTabs extends Component<BottomTabsPropsInt, StateInt> {
109
114
110
115
component . childrenArray . forEach ( child => {
111
116
if ( child . childType === 'COMP' ) {
112
- tree . children . push ( this . generateComponentTree ( child . childComponentId , components ) ) ;
117
+ tree . children . push (
118
+ this . generateComponentTree ( child . childComponentId , components )
119
+ ) ;
113
120
} else {
114
121
tree . children . push ( {
115
122
name : child . componentName ,
@@ -122,13 +129,21 @@ class BottomTabs extends Component<BottomTabsPropsInt, StateInt> {
122
129
}
123
130
124
131
render ( ) : JSX . Element {
125
- const { classes, components, focusComponent, deleteProp, addProp, focusChild } = this . props ;
132
+ const {
133
+ classes,
134
+ components,
135
+ focusComponent,
136
+ deleteProp,
137
+ addProp,
138
+ focusChild
139
+ } = this . props ;
126
140
const { value } = this . state ;
127
141
128
142
// display count on the tab. user can see without clicking into tab
129
143
const propCount = focusComponent . props . length ;
130
- const htmlAttribCount = focusComponent . childrenArray . filter ( child => child . childType === 'HTML' )
131
- . length ;
144
+ const htmlAttribCount = focusComponent . childrenArray . filter (
145
+ child => child . childType === 'HTML'
146
+ ) . length ;
132
147
133
148
return (
134
149
< div className = { classes . root } >
@@ -155,7 +170,9 @@ class BottomTabs extends Component<BottomTabsPropsInt, StateInt> {
155
170
< Tab
156
171
disableRipple
157
172
classes = { { root : classes . tabRoot , selected : classes . tabSelected } }
158
- label = { `HTML Element Attributes ${ htmlAttribCount ? `(${ htmlAttribCount } )` : '' } ` }
173
+ label = { `HTML Element Attributes ${
174
+ htmlAttribCount ? `(${ htmlAttribCount } )` : ''
175
+ } `}
159
176
/>
160
177
< Tab
161
178
disableRipple
@@ -199,7 +216,12 @@ class BottomTabs extends Component<BottomTabsPropsInt, StateInt> {
199
216
/>
200
217
</ div >
201
218
) }
202
- { value === 1 && < CodePreview focusComponent = { focusComponent } components = { components } /> }
219
+ { value === 1 && (
220
+ < CodePreview
221
+ focusComponent = { focusComponent }
222
+ components = { components }
223
+ />
224
+ ) }
203
225
{ value === 2 && < Props /> }
204
226
{ value === 3 && focusChild . childType === 'HTML' && < HtmlAttr /> }
205
227
{ value === 3 && focusChild . childType !== 'HTML' && (
0 commit comments