Skip to content

Commit 5ea14ce

Browse files
committed
updated styling
co-authored-by: Crys Lim [email protected] co-authored-by: William Cheng [email protected] co-authored-by: Ron Fu [email protected]
1 parent 96d3e9c commit 5ea14ce

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed

app/src/components/bottom/UseStateModal.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,15 @@ function UseStateModal({ updateAttributeWithState, attributeToChange, childId })
2222
<div className="useState-header">
2323
<span>Choose State Source</span>
2424
<button
25-
style={{ padding: '1px', float: 'right' }}
25+
style={{ margin: '5px 5px' ,padding: '1px', float: 'right' }}
2626
onClick={() => setOpen(false)}
2727
>
2828
X
2929
</button>
3030
</div>
3131
<div className="useState-window">
3232
<div className="useState-dropdown">
33-
<div>
34-
{components}
35-
</div>
33+
{components}
3634
</div>
3735
<div className="useState-stateDisplay">
3836
<TableStateProps
@@ -51,7 +49,7 @@ function UseStateModal({ updateAttributeWithState, attributeToChange, childId })
5149

5250
return (
5351
<div>
54-
<button onClick={() => setOpen(true)}>Use State</button>
52+
<button className="useState-btn" onClick={() => setOpen(true)}>USE STATE</button>
5553
<Modal open={open}>{body}</Modal>
5654
</div>
5755
);

app/src/interfaces/Interfaces.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export interface Component {
3939
stateProps: StateProp[]; // state: [ { id, key, value, type }, ...]
4040
annotations?: string;
4141
useStateCodes: string[];
42-
useContext?: object // {providerId: {attribute: stateId, ....}, ...}
42+
useContext?: object // structure --> {providerId: {attribute: stateId, ....}, ...}
43+
// example:
4344
// {1: {compText: 1, compLink: 2}}
4445
// {1: {compText: 1}, 2: {compLink: 1}, ....}
4546
}

app/src/public/styles/style.css

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -609,16 +609,30 @@ a.nav_link:hover {
609609
z-index: 999;
610610
}
611611

612+
.useState-btn {
613+
color: rgb(241, 240, 240);
614+
background-color: #0099E6;
615+
font-family: Arial, Helvetica, sans-serif;
616+
}
617+
618+
.useState-btn {
619+
color: rgb(241, 240, 240);
620+
background-color: #0099E6;
621+
border: 1px solid #186BB4;
622+
border-radius: 3;
623+
box-shadow: "0 0px 0px 2px #1a1a1a";
624+
padding: 2px 2px 2px 2px;
625+
}
626+
612627
/* UseStateModal Styling */
613628

614629
.useState-position {
615630
display: flex;
616631
flex-direction: column;
617632
position: fixed;
618-
align-items:flex-start;
633+
align-items: center;
619634
top: 30%;
620635
left: 30%;
621-
622636
}
623637

624638
.useState-header {
@@ -633,16 +647,23 @@ a.nav_link:hover {
633647
border-radius: 15px 15px 0px 0px;
634648
}
635649

650+
.useState-dropdown {
651+
align-self: flex-start;
652+
}
653+
636654
.useState-window {
637655
width: 600px;
638-
height: 300px;
656+
height: 400px;
639657
resize: none;
640658
white-space: pre-line;
641659
font-size: 18px;
642-
border: 3px;
660+
border: 2px;
643661
border-style: solid;
644662
border-color: black;
645663
border-radius: 0px 0px 15px 15px;
646664
font-family: Arial, Helvetica, sans-serif;
647-
background-color: rgb(241, 240, 240);;
665+
background-color: rgb(241, 240, 240);
666+
display: flex;
667+
flex-direction: column;
668+
align-items: center;
648669
}

0 commit comments

Comments
 (0)