src/js/utils/modal.js
function toggleShepherdModalClass(currentElement) {
  const shepherdModal = document.querySelector(`${classNames.modalTarget}`);

  if (shepherdModal) {
    shepherdModal.classList.remove(classNames.modalTarget);
  }

  currentElement.classList.add(classNames.modalTarget);
}
function toggleShepherdModalClass(currentElement) {
  const shepherdModal = document.querySelector(`${classNames.modalTarget}`);

  if (shepherdModal) {
    shepherdModal.classList.remove(classNames.modalTarget);
  }

  currentElement.classList.add(classNames.modalTarget);
}
function toggleShepherdModalClass ( currentElement ) { const shepherdModal = document . querySelector ( ` ${ classNames . modalTarget } ` ) ; if ( shepherdModal ) { shepherdModal . classList . remove ( classNames . modalTarget ) ; } currentElement . classList . add ( classNames . modalTarget ) ; }
Remove any leftover modal target classes and add the modal target class to the currentElement
@param {HTMLElement} currentElement The element for the current step
Remove any leftover modal target classes and add the modal target class to the currentElement