/
table.yaml
167 lines (166 loc) · 4.45 KB
/
table.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
params:
- name: rows
type: array
required: true
description: Array of table rows and cells.
params:
- name: text
type: string
required: true
description: If `html` is set, this is not required. Text for cells in table rows. If `html` is provided, the `text` argument will be ignored.
- name: html
type: string
required: true
description: If `text` is set, this is not required. HTML for cells in table rows. If `html` is provided, the `text` argument will be ignore
- name: format
type: string
required: false
description: Specify format of a cell. Currently we only use "numeric".
- name: classes
type: string
required: false
description: Classes to add to the table row cell.
- name: colspan
type: integer
required: false
description: Specify how many columns a cell extends.
- name: rowspan
type: integer
required: false
description: Specify how many rows a cell extends.
- name: attributes
type: object
required: false
description: HTML attributes (for example data attributes) to add to the table container.
- name: head
type: array
required: false
description: Array of table head cells.
params:
- name: text
type: string
required: false
description: If `html` is set, this is not required. Text for table head cells. If `html` is provided, the `text` argument will be ignored.
- name: html
type: string
required: false
description: If `text` is set, this is not required. HTML for table head cells. If `html` is provided, the `text` argument will be ignore
- name: format
type: string
required: false
description: Specify format of a cell. Currently we only use "numeric".
- name: classes
type: string
required: false
description: Classes to add to the table head cell.
- name: colspan
type: integer
required: false
description: Specify how many columns a cell extends.
- name: rowspan
type: integer
required: false
description: Specify how many rows a cell extends.
- name: attributes
type: object
required: false
description: HTML attributes (for example data attributes) to add to the table container.
- name: caption
type: string
required: false
description: Caption text
- name: captionClasses
type: string
required: false
description: Classes for caption text size. Classes should correspond to the available typography heading classes.
- name: firstCellIsHeader
type: boolean
required: false
description: If set to true, first cell in table row will be a TH instead of a TD.
- name: classes
type: string
required: false
description: Classes to add to the table container.
- name: attributes
type: object
required: false
description: HTML attributes (for example data attributes) to add to the table container.
examples:
- name: default
data:
rows:
-
- text: January
- text: £85
format: numeric
- text: £95
format: numeric
-
- text: February
- text: £75
format: numeric
- text: £55
format: numeric
-
- text: March
- text: £165
format: numeric
- text: £125
format: numeric
- name: table with head
data:
head:
- text: Month you apply
- text: Rate for bicycles
format: numeric
- text: Rate for vehicles
format: numeric
rows:
-
- text: January
- text: £85
format: numeric
- text: £95
format: numeric
-
- text: February
- text: £75
format: numeric
- text: £55
format: numeric
-
- text: March
- text: £165
format: numeric
- text: £125
format: numeric
- name: table with head and caption
data:
caption: 'Caption 1: Months and rates'
captionClasses: govuk-heading-m
firstCellIsHeader: true
head:
- text: Month you apply
- text: Rate for bicycles
format: numeric
- text: Rate for vehicles
format: numeric
rows:
-
- text: January
- text: £85
format: numeric
- text: £95
format: numeric
-
- text: February
- text: £75
format: numeric
- text: £55
format: numeric
-
- text: March
- text: £165
format: numeric
- text: £125
format: numeric