diff --git a/CHANGELOG.md b/CHANGELOG.md index 75be3a72..8cb03beb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### Changed + +- Changed `attributes` to `formGroupAttributes` and `classes` to `formClasses` on checkboxes and radios - `attributes` and `classes` now get applied to each checkbox and radio element + ### Deprecated ### Removed ### Fixed diff --git a/src/nationalarchives/components/checkboxes/macro-options.json b/src/nationalarchives/components/checkboxes/macro-options.json index 1af137a5..6e7892d4 100644 --- a/src/nationalarchives/components/checkboxes/macro-options.json +++ b/src/nationalarchives/components/checkboxes/macro-options.json @@ -87,16 +87,28 @@ "required": false, "description": "" }, + { + "name": "formGroupClasses", + "type": "string", + "required": false, + "description": "Classes to add to the checkboxes form group." + }, + { + "name": "formGroupAttributes", + "type": "string", + "required": false, + "description": "HTML attributes (for example data attributes) to add to the checkboxes form group." + }, { "name": "classes", "type": "string", "required": false, - "description": "Classes to add to the checkboxes." + "description": "Classes to add to the checkbox elements." }, { "name": "attributes", "type": "object", "required": false, - "description": "HTML attributes (for example data attributes) to add to the checkboxes." + "description": "HTML attributes (for example data attributes) to add to the checkbox elements." } ] diff --git a/src/nationalarchives/components/checkboxes/template.njk b/src/nationalarchives/components/checkboxes/template.njk index 9656e9a8..99119748 100644 --- a/src/nationalarchives/components/checkboxes/template.njk +++ b/src/nationalarchives/components/checkboxes/template.njk @@ -2,7 +2,7 @@ {%- if params.inline -%} {%- set containerClasses = containerClasses.concat('tna-form__group--inline') -%} {%- endif -%} -