Skip to content

Commit 33f7ed6

Browse files
committed
make scorecard form mobile friendly
1 parent c8ea7d0 commit 33f7ed6

File tree

4 files changed

+83
-2
lines changed

4 files changed

+83
-2
lines changed

src/apps/review/src/pages/scorecards/EditScorecardPage/EditScorecardPage.module.scss

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
background-color: #F6F7F9;
3636
border-radius: $sp-2;
3737
padding: $sp-8;
38+
@include ltemd {
39+
padding: $sp-3;
40+
}
3841
}
3942

4043
.scorecardInfo {
@@ -60,11 +63,25 @@
6063
display: flex;
6164
gap: $sp-4;
6265
width: 100%;
66+
@include ltemd {
67+
flex-wrap: wrap;
68+
position: relative;
69+
70+
.trashIcon {
71+
position: absolute;
72+
bottom: 100%;
73+
right: 0;
74+
flex: 0 0 100%;
75+
}
76+
}
6377
}
6478
}
6579

6680
.contentArea {
6781
padding: $sp-5 $sp-4;
82+
@include ltemd {
83+
padding: $sp-3;
84+
}
6885
}
6986

7087
.groupWrap {
@@ -76,6 +93,9 @@
7693
.contentArea {
7794
background: #E0E4E84D;
7895
padding: $sp-10 $sp-8;
96+
@include ltemd {
97+
padding: $sp-3;
98+
}
7999
}
80100
}
81101

@@ -92,8 +112,11 @@
92112

93113
.questionWrap {
94114
.questionItem {
115+
--pad-x: #{$sp-4};
116+
--pad-y: #{$sp-5};
117+
95118
width: 100%;
96-
padding: $sp-5 $sp-4;
119+
padding: var(--pad-y) var(--pad-x);
97120
background: #F6F7F9;
98121

99122
display: grid;
@@ -120,6 +143,42 @@
120143
.headerAreaLabel {
121144
width: 100%;
122145
}
146+
147+
@include ltemd {
148+
.questionItem {
149+
--pad-x: #{$sp-3};
150+
--pad-y: #{$sp-3};
151+
position: relative;
152+
grid-template-columns: 1fr 1fr;
153+
grid-template-rows: auto auto;
154+
gap: $sp-4;
155+
156+
:global(.main-group) {
157+
grid-column: 1 / -1;
158+
}
159+
160+
:global(.weight-group) {
161+
grid-column: 1 / -1;
162+
}
163+
164+
:global(.action-group) {
165+
position: absolute;
166+
top: var(--pad-y);
167+
right: var(--pad-x);
168+
height: 28px;
169+
}
170+
171+
.doubleInputWrap {
172+
display: flex;
173+
flex-direction: column;
174+
gap: $sp-4;
175+
176+
> * {
177+
flex: 1;
178+
}
179+
}
180+
}
181+
}
123182
}
124183

125184
.xlWidthInput {
@@ -135,6 +194,15 @@
135194
flex: 0 0 40%;
136195
}
137196

197+
.xlWidthInput,
198+
.smWidthInput,
199+
.mdWidthInput {
200+
@include ltemd {
201+
flex: 0 0 100%;
202+
}
203+
}
204+
205+
138206
.doubleInputWrap {
139207
display: flex;
140208
gap: $sp-3;
@@ -160,6 +228,10 @@
160228
justify-content: space-between;
161229
align-items: center;
162230
margin-top: $sp-5;
231+
@include ltemd {
232+
flex-direction: column;
233+
align-items: center;
234+
}
163235
}
164236

165237
.bottomContainer {

src/apps/review/src/pages/scorecards/EditScorecardPage/components/BasicSelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const BasicSelect: FC<BasicSelectProps<any>> = props => (
2626
{props.options.map(option => (
2727
<option
2828
key={`${option.value}`}
29-
value={option.value as string}
29+
value={`${option.value}`}
3030
>
3131
{option.label}
3232
</option>

src/apps/review/src/pages/scorecards/EditScorecardPage/components/CalculatedWeightsSum.module.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@
66
align-items: center;
77

88
margin-right: 56px;
9+
10+
@include ltemd {
11+
margin-right: 0;
12+
}
913
}
1014

1115
.labels {
1216
text-align: right;
1317
> * {
1418
line-height: 20px;
1519
}
20+
21+
@include ltemd {
22+
text-align: left;
23+
}
1624
}
1725

1826
.value {

src/libs/ui/lib/components/button/base-button/BaseButton.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,4 +253,5 @@ $btn-secondary-border-width: $border;
253253
--btn-secondary-border-width: 1px;
254254

255255
font-weight: $font-weight-medium;
256+
font-family: "Nunito Sans", sans-serif;
256257
}

0 commit comments

Comments
 (0)