wip file field

This commit is contained in:
lexx committed 2024-09-28 18:36:18 +03:00
1 parent 5ed57838fc
commit 39e7a3aed4
25 files changed
+674 -44

No files matched your search

+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);
}