Skip to content

Commit 9692c88

Browse files
authored
Merge pull request #30 from sean1292/staging
Edited styling for the component cards
2 parents 2c7ff65 + bdb52bc commit 9692c88

File tree

2 files changed

+71
-80
lines changed

2 files changed

+71
-80
lines changed

src/components/LeftColExpansionPanel.tsx

Lines changed: 70 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ const LeftColExpansionPanel = (props: LeftColExpPanPropsInt) => {
6565
container
6666
spacing={16}
6767
direction="row"
68-
justify="flex-start"
68+
justify="center"
6969
alignItems="center"
70+
style={{ minWidth: '320px' }}
7071
>
7172
<Grid item xs={9}>
7273
<div
@@ -90,6 +91,7 @@ const LeftColExpansionPanel = (props: LeftColExpPanPropsInt) => {
9091
color: 'red',
9192
backgroundColor: color,
9293
borderRadius: '10px',
94+
minWidth: '320px',
9395
}}
9496
>
9597
<List style={{ color: 'red' }}>
@@ -122,42 +124,33 @@ const LeftColExpansionPanel = (props: LeftColExpPanPropsInt) => {
122124
*/}
123125

124126
{/* 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-
)}
143127

144128
{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 ? (
129+
<span>
130+
<InputLabel
131+
htmlFor="stateful"
132+
style={{
133+
color: '#fff',
134+
marginBottom: '10px',
135+
marginTop: '0px',
136+
marginLeft: '11px',
137+
padding: '0px',
138+
fontSize: '18px',
139+
textShadow: '1px 1px 2px rgba(0, 0, 0, 0.7)',
140+
}}
141+
>
142+
State?
143+
</InputLabel>
144+
<Switch
145+
checked={stateful}
146+
onChange={e => {
147+
toggleComponentState(id);
148+
changeFocusComponent({ title });
149+
}}
150+
value="stateful"
151+
color="primary"
152+
// id={props.id.toString()}
153+
/>
161154
<InputLabel
162155
htmlFor="classBased"
163156
style={{
@@ -171,11 +164,8 @@ const LeftColExpansionPanel = (props: LeftColExpPanPropsInt) => {
171164
}}
172165
>
173166
Class?
174-
</InputLabel>
175-
) : (
176-
''
177-
)}
178-
{focusedToggle ? (
167+
</InputLabel>{' '}
168+
(
179169
<Switch
180170
checked={classBased}
181171
onChange={e => {
@@ -185,48 +175,49 @@ const LeftColExpansionPanel = (props: LeftColExpPanPropsInt) => {
185175
value="classBased"
186176
color="primary"
187177
/>
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-
}
178+
</span>
179+
) : (
180+
''
181+
)}
182+
183+
{focusedToggle && component.id !== 1 ? (
184+
<Button
185+
variant="text"
186+
size="small"
187+
color="default"
188+
aria-label="Delete"
189+
className={classes.margin}
190+
onClick={() =>
191+
deleteComponent({
192+
componentId: id,
193+
stateComponents: components,
194+
})
195+
}
196+
style={{
197+
color: 'white',
198+
marginBottom: '0px',
199+
marginTop: '4px',
200+
}}
201+
>
202+
<DeleteIcon
203+
style={{
204+
color: '#b30000',
205+
textShadow: '1px 1px 2px rgba(0, 0, 0, 0.5)',
206+
}}
207+
/>
208+
<div
204209
style={{
205-
color: 'white',
206-
marginBottom: '0px',
207-
marginTop: '4px',
210+
marginTop: '3px',
211+
fontSize: '15px',
212+
textShadow: '1px 1px 2px rgba(0, 0, 0, 0.8)',
208213
}}
209214
>
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>
215+
Delete Component
216+
</div>
217+
</Button>
218+
) : (
219+
''
220+
)}
230221
</div>
231222
}
232223
style={{ color }}

src/containers/LeftContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ class LeftContainer extends Component<LeftContPropsInt, StateInt> {
250250
const { addImage } = this;
251251

252252
return (
253-
<div className="column left">
253+
<div className="column left" style={{ minWidth: '466px' }}>
254254
<Grid
255255
container
256256
spacing={8}

0 commit comments

Comments
 (0)