Skip to content

Commit

Permalink
updated design examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pflynny committed Sep 21, 2023
1 parent d9abd95 commit 22af022
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 17 deletions.
3 changes: 2 additions & 1 deletion app/components/input/autocomplete.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
},
"id": "input-with-autocomplete-attribute",
"name": "postcode",
"autocomplete": "postal-code"
"autocomplete": "postal-code",
"classes": "nhsuk-input--width-5"
}) }}
</div>
</div>
Expand Down
7 changes: 3 additions & 4 deletions app/components/input/custom-width.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
<div class="nhsuk-grid-column-two-thirds">
{{ input({
"label": {
"text": "National insurance number"
"text": "National Insurance number",
"classes": "nhsuk-label--l"
},
"hint": {
"text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, QQ 12 34 56 C."
"text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, 'QQ 12 34 56 C'."
},
"id": "input-width-10",
"name": "test-width-10",
"classes": "nhsuk-input--width-10"
}) }}
</div>
Expand Down
4 changes: 3 additions & 1 deletion app/components/input/error-and-prefix-and-suffix.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
<div class="nhsuk-grid-column-two-thirds">
{{ input({
"label": {
"text": "What is the cost per item, in pounds?"
"text": "What is the cost per item, in pounds?",
"classes": "nhsuk-label--l"
},
"id": "input-with-error-message-and-prefix-and-suffix",
"name": "test-name-7",
"prefix": "£",
"suffix": "per item",
"classes": "nhsuk-input--width-5",
"errorMessage": {
"text": "Enter a cost per item, in pounds"
}
Expand Down
6 changes: 4 additions & 2 deletions app/components/input/error.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
<div class="nhsuk-grid-column-two-thirds">
{{ input({
"label": {
"text": "National Insurance number"
"text": "National Insurance number",
"classes": "nhsuk-label--l"
},
"hint": {
"text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, QQ 12 34 56 C."
"text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, 'QQ 12 34 56 C'."
},
"id": "input-with-error-message",
"name": "test-name-3",
"classes": "nhsuk-input--width-10",
"errorMessage": {
"text": "Error message goes here"
}
Expand Down
8 changes: 5 additions & 3 deletions app/components/input/hint.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
<div class="nhsuk-grid-column-two-thirds">
{{ input({
"label": {
"text": "National insurance number"
"text": "National Insurance number",
"classes": "nhsuk-label--l"
},
"hint": {
"text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, QQ 12 34 56 C."
"text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, 'QQ 12 34 56 C'."
},
"id": "input-with-hint-text",
"name": "test-name-2"
"name": "test-name-2",
"classes": "nhsuk-input--width-10"
}) }}
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions app/components/input/prefix-and-suffix.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
<div class="nhsuk-grid-column-two-thirds">
{{ input({
"label": {
"text": "What is the cost per item, in pounds?"
"text": "What is the cost per item, in pounds?",
"classes": "nhsuk-label--l"
},
"id": "input-with-prefix-and-suffix",
"name": "test-name-6",
"prefix": "£",
"suffix": "per item"
"suffix": "per item",
"classes": "nhsuk-input--width-5"

}) }}
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions app/components/input/prefix.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
<div class="nhsuk-grid-column-two-thirds">
{{ input({
"label": {
"text": "What is the cost in pounds?"
"text": "What is the cost in pounds?",
"classes": "nhsuk-label--l"
},
"id": "input-with-prefix",
"name": "test-name-4",
"prefix": "£"
"prefix": "£",
"classes": "nhsuk-input--width-5"
}) }}
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions app/components/input/suffix.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
<div class="nhsuk-grid-column-two-thirds">
{{ input({
"label": {
"text": "What is the weight in kilograms?"
"text": "What is the weight in kilograms?",
"classes": "nhsuk-label--l"
},
"id": "input-with-suffix",
"name": "test-name-5",
"suffix": "kg"
"suffix": "kg",
"classes": "nhsuk-input--width-5"
}) }}
</div>
</div>
Expand Down

0 comments on commit 22af022

Please sign in to comment.