You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -262,7 +262,8 @@ Find out more about the table component and when to use it in the [NHS digital s
262
262
},
263
263
{
264
264
header: "Howmuch?",
265
-
text: "2.5ml"
265
+
text: "2.5ml",
266
+
classes: "nhsuk-u-width-one-quarter"
266
267
},
267
268
{
268
269
header: "Howoften?",
@@ -312,8 +313,10 @@ The table Nunjucks macro takes the following arguments:
312
313
| **rows** | array | Yes | Array of table rows and cells. |
313
314
| **rows.[].text (or) rows.[].html** | string | Yes | Text or HTML for cells in table rows. If `html` is specified, the `text` argument will be ignored. |
314
315
| **rows.[].format** | string | No | Specify format of a cell. Currently we only use "numeric". |
316
+
| **rows.[].classes** | string | No | Classes to add to the table row cell. |
315
317
| **rows.[].colspan** | number | No | Specify how many columns a cell extends. |
316
318
| **rows.[].rowspan** | number | No | Specify how many rows a cell extends. |
319
+
| **rows.[].attributes** | object | No | HTML attributes (for example data attributes) to add to the table cell. |
317
320
| **panel** | boolean | No | If set to true, the table is rendered inside a [panel with a label](https://nhsuk.github.io/nhsuk-frontend/components/panel-with-label.html). |
318
321
| **panelClasses** | string | No | Optional additional classes to add to the panel containing the table. Separate each class with a space. |
319
322
| **heading** | string | No | Heading/label of the panel if the panel argument is set to true. |
@@ -324,9 +327,11 @@ The table Nunjucks macro takes the following arguments:
324
327
| **captionClasses** | string | No | Optional additional classes to add to the table caption, for example `nhsuk-table__caption--l`. Separate each class with a space. |
325
328
| **head** | array | No | Optional array of table head cells. |
326
329
| **head.[].text or head.[].html** | array | No | Optional array of table head cells. If `html` is specified, the `text` argument will be ignored. |
330
+
| **head.[].format** | string | No | Specify format of a cell. Currently we only use "numeric". |
331
+
| **head.[].classes** | string | No | Classes to add to the table head cell. |
327
332
| **head.[].colspan** | number | No | Specify how many columns a cell extends. |
328
333
| **head.[].rowspan** | number | No | Specify how many rows a cell extends. |
329
-
|**head.[].format**| string| No |Specify format of a cell. Currently we only use "numeric". |
334
+
| **head.[].attributes** | object | No | HTML attributes (for example data attributes) to add to the table cell. |
330
335
| **firstCellIsHeader** | boolean | No | If set to true, first cell in table row will be a TH instead of a TD. |
331
336
| **responsive** | boolean | No | If set to true, responsive table classes will be applied. |
0 commit comments