(hex)
| 1572 | const inputEl = modal.querySelector('#folderColorInput'); |
| 1573 | |
| 1574 | function applyPreview(hex) { |
| 1575 | if (!hex || typeof hex !== 'string') return; |
| 1576 | const front = hex; |
| 1577 | const back = lighten(hex, 14); |
| 1578 | const stroke = darken(hex, 22); |
| 1579 | previewEl.style.setProperty('--filr-folder-front', front); |
| 1580 | previewEl.style.setProperty('--filr-folder-back', back); |
| 1581 | previewEl.style.setProperty('--filr-folder-stroke', stroke); |
| 1582 | } |
| 1583 | applyPreview(defaultHex); |
| 1584 | inputEl?.addEventListener('input', () => applyPreview(inputEl.value)); |
| 1585 |
no test coverage detected