Improve rendering of color options

This commit is contained in:
Jeremy Stretch 2024-02-09 14:34:11 -05:00
parent 053e02d4d7
commit 80b49aa6b2
2 changed files with 3 additions and 1 deletions

Binary file not shown.

View File

@ -18,7 +18,9 @@ export function initStaticSelects(): void {
// Initialize color selection fields
export function initColorSelects(): void {
function renderColor(item: TomOption, escape: typeof escape_html) {
return `<div><span class="dropdown-item-indicator color-label" style="background-color: #${escape(item.value)}"></span> ${escape(item.text)}</div>`
return `<div><span class="dropdown-item-indicator color-label" style="background-color: #${escape(
item.value,
)}"></span> ${escape(item.text)}</div>`;
}
for (const select of getElements<HTMLSelectElement>('select.color-select')) {