@@ -122,42 +122,33 @@ const LeftColExpansionPanel = (props: LeftColExpPanPropsInt) => {
122
122
*/ }
123
123
124
124
{ /* LABEL AND TOGGLE(SWITCH) FOR STATEFULNESS */ }
125
- { focusedToggle ? (
126
- < InputLabel
127
- htmlFor = "stateful"
128
- style = { {
129
- color : '#fff' ,
130
- marginBottom : '10px' ,
131
- marginTop : '0px' ,
132
- marginLeft : '11px' ,
133
- padding : '0px' ,
134
- fontSize : '18px' ,
135
- textShadow : '1px 1px 2px rgba(0, 0, 0, 0.7)' ,
136
- } }
137
- >
138
- State?
139
- </ InputLabel >
140
- ) : (
141
- ''
142
- ) }
143
125
144
126
{ focusedToggle ? (
145
- < Switch
146
- checked = { stateful }
147
- onChange = { e => {
148
- toggleComponentState ( id ) ;
149
- changeFocusComponent ( { title } ) ;
150
- } }
151
- value = "stateful"
152
- color = "primary"
153
- // id={props.id.toString()}
154
- />
155
- ) : (
156
- ''
157
- ) }
158
- < div >
159
- { /* LABEL/TOGGLE(SWITCH) FOR CLASS BASED */ }
160
- { focusedToggle ? (
127
+ < span >
128
+ < InputLabel
129
+ htmlFor = "stateful"
130
+ style = { {
131
+ color : '#fff' ,
132
+ marginBottom : '10px' ,
133
+ marginTop : '0px' ,
134
+ marginLeft : '11px' ,
135
+ padding : '0px' ,
136
+ fontSize : '18px' ,
137
+ textShadow : '1px 1px 2px rgba(0, 0, 0, 0.7)' ,
138
+ } }
139
+ >
140
+ State?
141
+ </ InputLabel >
142
+ < Switch
143
+ checked = { stateful }
144
+ onChange = { e => {
145
+ toggleComponentState ( id ) ;
146
+ changeFocusComponent ( { title } ) ;
147
+ } }
148
+ value = "stateful"
149
+ color = "primary"
150
+ // id={props.id.toString()}
151
+ />
161
152
< InputLabel
162
153
htmlFor = "classBased"
163
154
style = { {
@@ -171,11 +162,8 @@ const LeftColExpansionPanel = (props: LeftColExpPanPropsInt) => {
171
162
} }
172
163
>
173
164
Class?
174
- </ InputLabel >
175
- ) : (
176
- ''
177
- ) }
178
- { focusedToggle ? (
165
+ </ InputLabel > { ' ' }
166
+ (
179
167
< Switch
180
168
checked = { classBased }
181
169
onChange = { e => {
@@ -185,48 +173,49 @@ const LeftColExpansionPanel = (props: LeftColExpPanPropsInt) => {
185
173
value = "classBased"
186
174
color = "primary"
187
175
/>
188
- ) : (
189
- ''
190
- ) }
191
- { focusedToggle && component . id !== 1 ? (
192
- < Button
193
- variant = "text"
194
- size = "small"
195
- color = "default"
196
- aria-label = "Delete"
197
- className = { classes . margin }
198
- onClick = { ( ) =>
199
- deleteComponent ( {
200
- componentId : id ,
201
- stateComponents : components ,
202
- } )
203
- }
176
+ </ span >
177
+ ) : (
178
+ ''
179
+ ) }
180
+
181
+ { focusedToggle && component . id !== 1 ? (
182
+ < Button
183
+ variant = "text"
184
+ size = "small"
185
+ color = "default"
186
+ aria-label = "Delete"
187
+ className = { classes . margin }
188
+ onClick = { ( ) =>
189
+ deleteComponent ( {
190
+ componentId : id ,
191
+ stateComponents : components ,
192
+ } )
193
+ }
194
+ style = { {
195
+ color : 'white' ,
196
+ marginBottom : '0px' ,
197
+ marginTop : '4px' ,
198
+ } }
199
+ >
200
+ < DeleteIcon
201
+ style = { {
202
+ color : '#b30000' ,
203
+ textShadow : '1px 1px 2px rgba(0, 0, 0, 0.5)' ,
204
+ } }
205
+ />
206
+ < div
204
207
style = { {
205
- color : 'white ' ,
206
- marginBottom : '0px ' ,
207
- marginTop : '4px ' ,
208
+ marginTop : '3px ' ,
209
+ fontSize : '15px ' ,
210
+ textShadow : '1px 1px 2px rgba(0, 0, 0, 0.8) ' ,
208
211
} }
209
212
>
210
- < DeleteIcon
211
- style = { {
212
- color : '#b30000' ,
213
- textShadow : '1px 1px 2px rgba(0, 0, 0, 0.5)' ,
214
- } }
215
- />
216
- < span
217
- style = { {
218
- marginTop : '3px' ,
219
- fontSize : '15px' ,
220
- textShadow : '1px 1px 2px rgba(0, 0, 0, 0.8)' ,
221
- } }
222
- >
223
- Delete Component
224
- </ span >
225
- </ Button >
226
- ) : (
227
- ''
228
- ) }
229
- </ div >
213
+ Delete Component
214
+ </ div >
215
+ </ Button >
216
+ ) : (
217
+ ''
218
+ ) }
230
219
</ div >
231
220
}
232
221
style = { { color } }
0 commit comments