-
Notifications
You must be signed in to change notification settings - Fork 319
/
back-link.yaml
61 lines (59 loc) · 1.54 KB
/
back-link.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
params:
- name: text
type: string
required: false
description: Text to use within the back link component. If `html` is provided, the `text` option will be ignored. Defaults to 'Back'.
- name: html
type: string
required: false
description: HTML to use within the back link component. If `html` is provided, the `text` option will be ignored. Defaults to 'Back'.
- name: href
type: string
required: true
description: The value of the link's `href` attribute.
- name: classes
type: string
required: false
description: Classes to add to the anchor tag.
- name: attributes
type: object
required: false
description: HTML attributes (for example data attributes) to add to the anchor tag.
examples:
- name: default
data:
href: '#'
- name: with custom text
data:
href: '#'
text: Back to home
- name: with inverted colours
previewLayoutModifiers:
- inverse
data:
classes: govuk-back-link--inverse
href: '#'
# Hidden examples are not shown in the review app, but are used for tests and HTML fixtures
- name: classes
hidden: true
data:
classes: app-back-link--custom-class
href: '#'
- name: html as text
hidden: true
data:
text: <b>Home</b>
href: '#'
- name: html
hidden: true
data:
html: <b>Back</b>
href: '#'
- name: attributes
hidden: true
data:
href: '#'
html: <b>Back to home</b>
attributes:
data-test: attribute
aria-label: Back to home