feat(react): add custom elements bundle (#23896)

This commit is contained in:
Liam DeBeasi
2021-09-13 14:53:28 -04:00
committed by GitHub
parent d1763fc8b5
commit c50d895370
57 changed files with 321 additions and 565 deletions

View File

@@ -148,6 +148,12 @@ export class Menu implements ComponentInterface, MenuI {
@Event() protected ionMenuChange!: EventEmitter<MenuChangeEventDetail>;
async connectedCallback() {
// TODO: connectedCallback is fired in CE build
// before WC is defined. This needs to be fixed in Stencil.
if (typeof (customElements as any) !== 'undefined') {
await customElements.whenDefined('ion-menu');
}
if (this.type === undefined) {
this.type = config.get('menuType', 'overlay');
}

View File

@@ -60,7 +60,12 @@ export class SplitPane implements ComponentInterface {
this.ionSplitPaneVisible.emit(detail);
}
connectedCallback() {
async connectedCallback() {
// TODO: connectedCallback is fired in CE build
// before WC is defined. This needs to be fixed in Stencil.
if (typeof (customElements as any) !== 'undefined') {
await customElements.whenDefined('ion-split-pane');
}
this.styleChildren();
this.updateState();
}