wip file field
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user