wip file field

This commit is contained in:
2024-09-28 18:36:18 +03:00
parent 5ed57838fc
commit 39e7a3aed4
25 changed files with 674 additions and 44 deletions
+13
View File
@@ -0,0 +1,13 @@
export function colorPicker() {
document.querySelectorAll(".color-picker").forEach(el => {
colorPickerInit(el);
})
}
function colorPickerInit(el){
const colorInput = el.querySelector("[type=color]");
const textInput = el.querySelector("[type=text]");
colorInput.addEventListener("change",(e) => textInput.value = colorInput.value);
textInput.addEventListener("change",(e) => colorInput.value = textInput.value);
}