Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
webjsavella committed Jan 15, 2025
1 parent 0e27224 commit 0bc1450
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions eds/blocks/columns/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ const toggleLoader = () => {
}
};

const removeModal = (modal) =>{
const removeModal = (modal) => {
const videoIframeWrapper = document.querySelector('.video-iframe-wrapper');
if (videoIframeWrapper) {
videoIframeWrapper.remove();
}

['style', 'tabindex', 'aria-hidden'].forEach((attr) => document.body.removeAttribute(attr));
modal.remove();
}
};

// decorate modal
function decorateModal() {
Expand All @@ -37,6 +37,8 @@ function decorateModal() {
iframe.setAttribute('src', href);
}

const modal = document.createElement('div');
modal.classList.add('co3-modal', 'calcite-mode-dark');
const closeButton = document.createElement('calcite-icon');
closeButton.classList.add('co3-modal-container', 'calcite-icon');
closeButton.setAttribute('icon', 'x');
Expand All @@ -52,11 +54,9 @@ function decorateModal() {
removeModal(modal);
}
});

Check failure on line 57 in eds/blocks/columns/columns.js

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed
const modalContainer = document.createElement('div');
modalContainer.classList.add('co3-modal-container');
const modal = document.createElement('div');
modal.classList.add('co3-modal', 'calcite-mode-dark');
modalContainer.appendChild(iframe);
modalContainer.appendChild(closeButton);
modal.appendChild(modalContainer);
Expand Down

0 comments on commit 0bc1450

Please sign in to comment.