Skip to content
This repository was archived by the owner on Jan 17, 2024. It is now read-only.

Commit d1fc801

Browse files
authored
Add email component (#14)
1 parent 6cb8dd2 commit d1fc801

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.8.0
4+
5+
Added email component snippet
6+
7+
## 0.7.0
8+
39
## 0.6.0
410

511
Added bank details component snippet

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ After installing the package, you will need to restart Atom.
5959
|[Checkboxes](https://design-system.service.gov.uk/components/checkboxes/)|`govuk-checkboxes`||
6060
|Checkbox or radio option|`govuk-option`|Use in conjunction with the `govuk-checkboxes` and `govuk-radios` Nunjucks snippets.|
6161
|[Dates](https://design-system.service.gov.uk/components/date-input/)|`govuk-date`||
62+
|[Email address](https://design-system.service.gov.uk/patterns/email-addresses/)|`govuk-email`||
6263
|[Error summary](https://design-system.service.gov.uk/components/error-summary/)|`govuk-error-summary`||
6364
|[Fieldset](https://design-system.service.gov.uk/components/fieldset/)|`govuk-fieldset`||
6465
|[File upload](https://design-system.service.gov.uk/components/file-upload/)|`govuk-file`||

snippets/form-elements.cson

+20
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,26 @@
233233
]
234234
}) }}$6
235235
"""
236+
'Email address':
237+
'leftLabel': 'GOV.UK'
238+
'description': 'Email address – GOV.UK Design System'
239+
'descriptionMoreURL': 'https://design-system.service.gov.uk/patterns/email-addresses/'
240+
'prefix': 'govuk-email'
241+
'body': """
242+
{{ govukInput({
243+
id: "${1:email}",
244+
name: "${1:email}",
245+
label: {
246+
text: "${2:Email address}"
247+
},
248+
hint: {
249+
text: "${3:Hint text}"
250+
},
251+
type: "email",
252+
autocomplete: "email",
253+
spellcheck: false
254+
}) }}$3
255+
"""
236256
'Error summary':
237257
'leftLabel': 'GOV.UK'
238258
'description': 'Error summary – GOV.UK Design System'

0 commit comments

Comments
 (0)