Skip to content

Commit

Permalink
Add styling and new input component
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei0105 committed Jun 21, 2020
1 parent 41968b7 commit c071eed
Show file tree
Hide file tree
Showing 4 changed files with 350 additions and 110 deletions.
10 changes: 10 additions & 0 deletions cgm-calibration-react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions cgm-calibration-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
"@types/react": "^16.9.38",
"@types/react-dom": "^16.9.8",
"@types/recharts": "^1.8.12",
"@types/regression": "^2.0.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1",
"recharts": "^1.8.5",
"regression": "^2.0.1",
"typescript": "^3.7.5"
},
"scripts": {
Expand Down
162 changes: 162 additions & 0 deletions cgm-calibration-react/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,165 @@
transform: rotate(360deg);
}
}

* {
box-sizing: border-box;
}

body {
background: #61c87a;
background: linear-gradient(to right, #61c88c, #39ce5f);
}

.field {
width: 100%;
height: 56px;
border-radius: 4px;
position: relative;
background-color: rgba(255, 255, 255, 0.3);
transition: 0.3s background-color ease-in-out, 0.3s box-shadow ease-in-out;
}

.field:hover {
background-color: rgba(255, 255, 255, 0.45);
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
}

.field.active {
background-color: #ffffff;
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.2);
}

.field.active input {
padding: 24px 16px 8px 16px;
}

.field.active input + label {
top: 4px;
opacity: 1;
color: #39ce5f;
}

.field.locked {
pointer-events: none;
}

.field input {
width: 100%;
height: 56px;
position: relative;
padding: 0px 16px;
border: none;
border-radius: 4px;
font-family: "Gotham SSm A", "Gotham SSm B", sans-serif;
font-size: 16px;
font-weight: 400;
line-height: normal;
background-color: transparent;
color: #282828;
outline: none;
box-shadow: 0px 4px 20px 0px transparent;
transition: 0.3s background-color ease-in-out, 0.3s box-shadow ease-in-out,
0.1s padding ease-in-out;
-webkit-appearance: none;
}

.field input::-webkit-input-placeholder {
color: rgba(255, 255, 255, 0.8);
}
.field input::-moz-placeholder {
color: rgba(255, 255, 255, 0.8);
}
.field input:-ms-input-placeholder {
color: rgba(255, 255, 255, 0.8);
}
.field input:-moz-placeholder {
color: rgba(255, 255, 255, 0.8);
}

.field input + label {
position: absolute;
top: 24px;
left: 16px;
font-family: "Gotham SSm A", "Gotham SSm B", sans-serif;
font-size: 12px;
font-weight: 600;
line-height: 24px;
color: #ffffff;
opacity: 0;
pointer-events: none;
transition: 0.1s all ease-in-out;
}

.field input + label.error {
color: #ec392f;
}

.field p.predicted {
position: absolute;
top: 8px;
left: 16px;
font-family: "Gotham SSm A", "Gotham SSm B", sans-serif;
font-size: 16px;
font-weight: 400;
line-height: 24px;
color: #e0e0e0;
opacity: 1;
pointer-events: none;
}

.div-form {
width: 400px;
margin: auto;
}

.div-chart {
background-color: #ebebeb;
display: inline-block;
margin: auto;
border-radius: 10px;
margin-bottom: 10px;
}

.div-charts {
width: 670px;
margin: auto;
}

.div-form button {
font-family: "Gotham SSm A", "Gotham SSm B", sans-serif;
font-size: 16px;
font-weight: 600;
line-height: normal;
outline: 0;
background: white;
width: 100%;
border: 0;
border-radius: 4px;
padding: 15px;
color: #39ce5f;
-webkit-transition: all 0.3 ease;
transition: all 0.3 ease;
cursor: pointer;
box-shadow: 4px 4px 4px 4px rgba(0, 0, 0, 0.1);
margin-bottom: 25px;
}

.div-form button:hover,
.form button:active,
.form button:focus {
background: lightgray;
}

.div-title {
font-family: "Gotham SSm A", "Gotham SSm B", sans-serif;
font-size: 25px;
font-weight: 400;
letter-spacing: 0.0625em;
text-align: center;
width: 100%;
border: 0;
padding: 15px;
color: white;
margin-bottom: 20px;
}
Loading

0 comments on commit c071eed

Please sign in to comment.