Reworking checkboxes to adhere to USWDS styling

This commit is contained in:
Jonathan Bobel
2023-08-14 10:35:11 -04:00
parent fc9667d25b
commit 1be305d045
24 changed files with 295 additions and 87 deletions

View File

@@ -43,14 +43,14 @@ function templatesAndFoldersCheckboxes (hierarchy) {
hierarchy.forEach((node, idx) => {
result += `
<div class="govuk-checkboxes__item template-list-item template-list-item-with-checkbox template-list-item-without-ancestors">
<div class="usa-checkbox template-list-item template-list-item-with-checkbox template-list-item-without-ancestors">
<input class="usa-checkbox__input" id="templates-or-folder-${idx}" name="templates_and_folders" type="checkbox" value="templates-or-folder-${idx}">
<label class="usa-checkbox__label template-list-item-label margin-top-05" for="templates-or-folder-${idx}">
<label class="usa-checkbox__label template-list-item-label" for="templates-or-folder-${idx}">
<span class="usa-sr-only">${node.label}</span>
<a href="/services/6658542f-0cad-491f-bec8-ab8457700ead/templates/all/folders/3d057d9a-51fc-45ea-8b63-0003206350a6" class="usa-link template-list-${node.type === 'folder' ? 'folder' : 'template'}">
<span class="live-search-relevant">${node.label}</span>
</a>
</label>
<a href="/services/6658542f-0cad-491f-bec8-ab8457700ead/templates/all/folders/3d057d9a-51fc-45ea-8b63-0003206350a6" class="usa-link template-list-${node.type === 'folder' ? 'folder' : 'template'}">
<span class="live-search-relevant">${node.label}</span>
</a>
${node.meta}
</div>`;

View File

@@ -183,7 +183,7 @@ describe('Update content', () => {
});
return `
<div class="bottom-gutter ajax-block-container">
<div class="tabs ajax-block-container">
<ul role="tablist" class="pill">
${pillsHTML}
</ul>