Skip to content

Commit

Permalink
Ensure better minification of grants table template ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
wotschofsky committed Nov 28, 2022
1 parent b9534ab commit 29e6ee3
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/modules/GrantsInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,16 @@ export default class GrantsInterface {
const status = this.client.grants[category.id];
const disabled = category.required ? 'disabled' : '';
const checked = category.required || status ? 'checked' : '';
row.innerHTML = `
<td class="consent-manager--table-toggle-col">
<input id="consent-manager--table-toggle-${category.id}" class="consent-manager--table-toggle" type="checkbox" ${checked} ${disabled} />
</td>
<td class="consent-manager--table-label-col">
<label for="consent-manager--table-toggle-${category.id}">
<span class="consent-manager--table-label">${category.label}</span>
<sub class="consent-manager--table-description">${category.description}</sub>
</label>
</td>
`;
row.innerHTML =
`<td class="consent-manager--table-toggle-col">` +
` <input id="consent-manager--table-toggle-${category.id}" class="consent-manager--table-toggle" type="checkbox" ${checked} ${disabled} />` +
`</td>` +
`<td class="consent-manager--table-label-col">` +
` <label for="consent-manager--table-toggle-${category.id}">` +
` <span class="consent-manager--table-label">${category.label}</span>` +
` <sub class="consent-manager--table-description">${category.description}</sub>` +
` </label>` +
`</td>`;
if (!category.required) {
const checkbox: HTMLInputElement = row.querySelector(
'input[type="checkbox"]'
Expand Down

0 comments on commit 29e6ee3

Please sign in to comment.