MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / renderAlertButtons

Method renderAlertButtons

core/src/components/alert/alert.tsx:776–800  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

774 }
775
776 private renderAlertButtons() {
777 const buttons = this.processedButtons;
778 const mode = getIonMode(this);
779 const alertButtonGroupClass = {
780 'alert-button-group': true,
781 'alert-button-group-vertical': buttons.length > 2 || this.isButtonGroupWrapped,
782 };
783 return (
784 <div class={alertButtonGroupClass} ref={(el) => (this.buttonGroupEl = el)}>
785 {buttons.map((button) => (
786 <button
787 {...button.htmlAttributes}
788 type="button"
789 id={button.id}
790 class={buttonClass(button)}
791 tabIndex={0}
792 onClick={() => this.buttonClick(button)}
793 >
794 <span class="alert-button-inner">{button.text}</span>
795 {mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
796 </button>
797 ))}
798 </div>
799 );
800 }
801
802 private renderAlertMessage(msgId: string) {
803 const { customHTMLEnabled, message } = this;

Callers 1

renderMethod · 0.95

Calls 3

buttonClickMethod · 0.95
getIonModeFunction · 0.90
buttonClassFunction · 0.70

Tested by

no test coverage detected