diff --git a/app/assets/javascripts/modules/all.mjs b/app/assets/javascripts/modules/all.mjs index 1d30e666d..a62daad45 100644 --- a/app/assets/javascripts/modules/all.mjs +++ b/app/assets/javascripts/modules/all.mjs @@ -9,6 +9,7 @@ import Header from 'govuk-frontend/components/header/header'; import Details from 'govuk-frontend/components/details/details'; import Button from 'govuk-frontend/components/button/button'; +import Radios from 'govuk-frontend/components/radios/radios'; /** * TODO: Ideally this would be a NodeList.prototype.forEach polyfill @@ -46,6 +47,11 @@ function initAll (options) { // Find first header module to enhance. var $toggleButton = scope.querySelector('[data-module="header"]') new Header($toggleButton).init() + + var $radios = scope.querySelectorAll('[data-module="radios"]') + nodeListForEach($radios, function ($radio) { + new Radios($radio).init() + }) } // Create separate namespace for GOVUK Frontend. diff --git a/gulpfile.js b/gulpfile.js index aef452c39..ccb3efd2d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -71,6 +71,7 @@ const copy = { 'hint', 'label', 'checkboxes', + 'radios', 'input' ]; let done = 0;