Skip to content

Commit

Permalink
Merge pull request #357 from statikbe/KarelJanVanHaute/issue350
Browse files Browse the repository at this point in the history
Add option to give extra class to modal dialog
  • Loading branch information
KarelJanVanHaute authored Sep 17, 2024
2 parents 0314a7a + 92be153 commit f47f35e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tailoff/js/components/modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ export class ModalComponent {
this.inlineContentWrapper = document.querySelector(id);
if (this.inlineContentWrapper) {
// this.modalContent.insertAdjacentHTML("afterbegin", content.innerHTML);
if (this.inlineContentWrapper.hasAttribute('data-dialog-class')) {
this.modal.classList.add(this.inlineContentWrapper.getAttribute('data-dialog-class'));
}
Array.from(this.inlineContentWrapper.children).forEach((element) => {
this.modalContent.insertAdjacentElement('beforeend', element);
});
Expand Down

0 comments on commit f47f35e

Please sign in to comment.