Skip to content

Commit

Permalink
change stacking and wording
Browse files Browse the repository at this point in the history
  • Loading branch information
roshaanbajwa committed Aug 24, 2023
1 parent 26ca6f6 commit c28459c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/components/input/error-and-prefix-and-suffix.njk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"prefix": "£",
"suffix": "per item",
"errorMessage": {
"text": "Error message goes here"
"text": "Enter a cost per item, in pounds"
}
}) }}
</div>
Expand Down
6 changes: 3 additions & 3 deletions app/components/input/prefix-and-suffix.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<div class="nhsuk-grid-column-two-thirds">
{{ input({
"label": {
"text": "How old are you?"
"text": "What is the cost per item, in pounds??"
},
"id": "input-with-prefix-and-suffix",
"name": "test-name-6",
"prefix": "I'm",
"suffix": "years old"
"prefix": "£",
"suffix": "per item"
}) }}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/components/input/suffix.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="nhsuk-grid-column-two-thirds">
{{ input({
"label": {
"text": "Weight"
"text": "What is the weight in kilograms?"
},
"id": "input-with-suffix",
"name": "test-name-5",
Expand Down
24 changes: 22 additions & 2 deletions packages/components/input/_input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@

.nhsuk-input__wrapper {
display: flex;

@include mq($until: mobile) {
display: block;
}
}

.nhsuk-input__prefix,
Expand All @@ -97,16 +101,32 @@
text-align: center;
white-space: nowrap;

@include mq($until: mobile) {
display: block;
height: 100%;
white-space: normal;
}

@include mq($until: tablet) {
line-height: 1.6;
font-size: 1.1875rem;
}
}

.nhsuk-input__prefix {
border-right: 0;
@include mq($until: mobile) {
border-bottom: 0;
}
@include mq($from: mobile) {
border-right: 0;
}
}

.nhsuk-input__suffix {
border-left: 0;
@include mq($until: mobile) {
border-top: 0;
}
@include mq($from: mobile) {
border-left: 0;
}
}

0 comments on commit c28459c

Please sign in to comment.