Skip to content

Commit 20c5175

Browse files
committed
create form changes
1 parent ff33967 commit 20c5175

4 files changed

Lines changed: 30 additions & 24 deletions

File tree

components/core/CreateShape.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,20 @@ const CreateShape = (props) => {
296296
<Container fluid>
297297
<Row lg={2} md={1} sm={1} xs={1}>
298298
<Col>
299-
<ShapeForm
299+
<ShapePreview
300300
shapeInformation={shapeInformation}
301301
handleChange={handleChange}
302-
handleSubmit={handleSubmit}
303-
validated={validated}
304302
/>
305303
</Col>
306304
<Col>
307-
<ShapePreview
305+
<ShapeForm
308306
shapeInformation={shapeInformation}
309307
handleChange={handleChange}
308+
handleSubmit={handleSubmit}
309+
validated={validated}
310310
/>
311311
</Col>
312+
312313
</Row>
313314
</Container>
314315
</Modal.Body>

components/utils/ShapeForm.js

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,15 @@ const ShapeForm = (props) => {
2222
required
2323
/>
2424
<Form.Control.Feedback type="invalid">Name required!</Form.Control.Feedback>
25+
<Form.Check
26+
name="private"
27+
label="Make it Private"
28+
id="private"
29+
checked={props.shapeInformation.private}
30+
onChange={(e) => props.handleChange(e)}
31+
className="mt-1"
32+
/>
2533
</Form.Group>
26-
2734
<Form.Group>
2835
<Form.Label>Type</Form.Label>
2936
<Form.Control
@@ -40,24 +47,16 @@ const ShapeForm = (props) => {
4047

4148
<Form.Group>
4249
<Form.Label>Color</Form.Label>
43-
<ColorPicker
44-
type="color"
45-
name="backgroundColor"
46-
value={props.shapeInformation.backgroundColor}
47-
onChange={props.handleChange}
48-
className="form-control-color"
49-
/>
50+
<div>
51+
<ColorPicker
52+
type="color"
53+
name="backgroundColor"
54+
value={props.shapeInformation.backgroundColor}
55+
onChange={props.handleChange}
56+
className="form-control-color"
57+
/>
58+
</div>
5059
</Form.Group>
51-
52-
<Form.Group>
53-
<Form.Check
54-
name="private"
55-
label="Make it Private"
56-
checked={props.shapeInformation.private}
57-
onChange={(e) => props.handleChange(e)}
58-
/>
59-
</Form.Group>
60-
6160
<Form.Group>
6261
<Form.Label>What's it about?</Form.Label>
6362
<Form.Control

components/utils/ShapePreview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const ShapePreview = (props) => {
7373
return(
7474
<>
7575
<Playground>
76-
<Box height="300px" width="300px" onClick={(e) => props.handleChange(e)}>
76+
<Box height="360px" width="360px" onClick={(e) => props.handleChange(e)}>
7777
{ props.shapeInformation.showShadow && <Shadow backgroundColor={props.shapeInformation.backgroundColor} id="shapeShadow" /> }
7878
<Component formula={props.shapeInformation.formula} backgroundColor={props.shapeInformation.backgroundColor} id="clippedShape" />
7979
{vertices}

styles/global.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
/* Font Sizes */
4242
--fs-xs: 0.6rem;
4343
--fs-sm: 0.8rem;
44-
--fs-rg: 0.96rem;
44+
--fs-rg: 0.90rem;
4545
--fs-md: 1.4rem;
4646
--fs-lg: 2rem;
4747
--fs-xl: 3rem;
@@ -329,6 +329,12 @@ code {
329329
color: var(--color-neutral-90);
330330
margin-bottom: 0.26rem;
331331
}
332+
.form-control {
333+
font-size: var(--fs-rg);
334+
}
335+
.form-check-label {
336+
font-size: var(--fs-rg);
337+
}
332338
.form-control-color {
333339
width: 5rem;
334340
height: 3rem;

0 commit comments

Comments
 (0)