-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
630540f
commit 26ca6f6
Showing
7 changed files
with
179 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Input with error message, prefix and suffix' %} | ||
{% from 'components/input/macro.njk' import input %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
{{ input({ | ||
"label": { | ||
"text": "What is the cost per item, in pounds?" | ||
}, | ||
"hint": { | ||
"text": "Divide the total cost, in pounds, by the number of items." | ||
}, | ||
"id": "input-with-error-message-and-prefix-and-suffix", | ||
"name": "test-name-7", | ||
"prefix": "£", | ||
"suffix": "per item", | ||
"errorMessage": { | ||
"text": "Error message goes here" | ||
} | ||
}) }} | ||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Input with prefix and suffix' %} | ||
{% from 'components/input/macro.njk' import input %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
{{ input({ | ||
"label": { | ||
"text": "How old are you?" | ||
}, | ||
"id": "input-with-prefix-and-suffix", | ||
"name": "test-name-6", | ||
"prefix": "I'm", | ||
"suffix": "years old" | ||
}) }} | ||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Input with prefix' %} | ||
{% from 'components/input/macro.njk' import input %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
{{ input({ | ||
"label": { | ||
"text": "What is the cost in pounds?" | ||
}, | ||
"id": "input-with-prefix", | ||
"name": "test-name-4", | ||
"prefix": "£" | ||
}) }} | ||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% set html_style = 'background-color: #f0f4f5;' %} | ||
{% set title = 'Input with suffix' %} | ||
{% from 'components/input/macro.njk' import input %} | ||
{% extends 'layout.njk' %} | ||
|
||
{% block body %} | ||
|
||
<div class="nhsuk-width-container"> | ||
<main class="nhsuk-main-wrapper" id="maincontent"> | ||
|
||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
{{ input({ | ||
"label": { | ||
"text": "Weight" | ||
}, | ||
"id": "input-with-suffix", | ||
"name": "test-name-5", | ||
"suffix": "kg" | ||
}) }} | ||
</div> | ||
</div> | ||
|
||
</main> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters