function toggleClassWithValue(element, className) {
  // element.addEventListener('focusin', () => {
  //   element.classList.add(className);
  // });

  // element.addEventListener('focusout', () => {
  //   element.classList.remove(className);
  // });
}

export { toggleClassWithValue as default };

function toggleClassWithValue(element, className) {
  element.addEventListener('input', () => {
    const value = element.value;
    if (value) {
      element.classList.add(className);
    } else {
      element.classList.remove(className);
    }
  });
}

export { toggleClassWithValue as default };

add js to add/remove class