feat(alert): add ability to use alert inline (#26316)

This commit is contained in:
Amanda Johnston
2022-11-18 13:32:27 -06:00
committed by GitHub
parent ef0d19c0f7
commit 08c0a5520a
13 changed files with 322 additions and 16 deletions

View File

@@ -86,7 +86,14 @@ export const CoreDelegate = () => {
BaseComponent.appendChild(el);
await new Promise((resolve) => componentOnReady(el, resolve));
} else if (BaseComponent.children.length > 0) {
} else if (
BaseComponent.children.length > 0 &&
(BaseComponent.tagName === 'ION-MODAL' || BaseComponent.tagName === 'ION-POPOVER')
) {
/**
* The delegate host wrapper el is only needed for modals and popovers
* because they allow the dev to provide custom content to the overlay.
*/
const root = BaseComponent.children[0] as HTMLElement;
if (!root.classList.contains('ion-delegate-host')) {
/**