MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / render

Method render

core/src/components/popover/popover.tsx:726–767  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

724 };
725
726 render() {
727 const mode = getIonMode(this);
728 const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
729 const desktop = isPlatform('desktop');
730 const enableArrow = arrow && !parentPopover;
731
732 return (
733 <Host
734 aria-modal="true"
735 no-router
736 tabindex="-1"
737 {...(htmlAttributes as any)}
738 style={{
739 zIndex: `${20000 + this.overlayIndex}`,
740 }}
741 class={{
742 ...getClassMap(this.cssClass),
743 [mode]: true,
744 'popover-translucent': this.translucent,
745 'overlay-hidden': true,
746 'popover-desktop': desktop,
747 [`popover-side-${side}`]: true,
748 [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false,
749 'popover-nested': !!parentPopover,
750 }}
751 onIonPopoverDidPresent={onLifecycle}
752 onIonPopoverWillPresent={onLifecycle}
753 onIonPopoverWillDismiss={onLifecycle}
754 onIonPopoverDidDismiss={onLifecycle}
755 onIonBackdropTap={this.onBackdropTap}
756 >
757 {!parentPopover && <ion-backdrop tappable={this.backdropDismiss} visible={this.showBackdrop} part="backdrop" />}
758
759 <div class="popover-wrapper ion-overlay-wrapper" onClick={dismissOnSelect ? () => this.dismiss() : undefined}>
760 {enableArrow && <div class="popover-arrow" part="arrow"></div>}
761 <div class="popover-content" part="content">
762 <slot></slot>
763 </div>
764 </div>
765 </Host>
766 );
767 }
768}
769
770const LIFECYCLE_MAP: any = {

Callers

nothing calls this directly

Calls 4

dismissMethod · 0.95
getIonModeFunction · 0.90
isPlatformFunction · 0.90
getClassMapFunction · 0.90

Tested by

no test coverage detected