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

Class Alert

core/src/components/alert/alert.tsx:49–890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 scoped: true,
48})
49export class Alert implements ComponentInterface, OverlayInterface {
50 private readonly delegateController = createDelegateController(this);
51 private readonly lockController = createLockController();
52 private readonly triggerController = createTriggerController();
53 private customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
54 private activeId?: string;
55 private inputType?: string;
56 private processedInputs: AlertInput[] = [];
57 private processedButtons: AlertButton[] = [];
58 private wrapperEl?: HTMLElement;
59 private buttonGroupEl?: HTMLElement;
60 private buttonGroupResizeObserver?: ResizeObserver;
61 private gesture?: Gesture;
62
63 @State() private isButtonGroupWrapped = false;
64
65 presented = false;
66 lastFocus?: HTMLElement;
67
68 @Element() el!: HTMLIonAlertElement;
69
70 /** @internal */
71 @Prop() overlayIndex!: number;
72
73 /** @internal */
74 @Prop() delegate?: FrameworkDelegate;
75
76 /** @internal */
77 @Prop() hasController = false;
78
79 /**
80 * If `true`, the keyboard will be automatically dismissed when the overlay is presented.
81 */
82 @Prop() keyboardClose = true;
83
84 /**
85 * Animation to use when the alert is presented.
86 */
87 @Prop() enterAnimation?: AnimationBuilder;
88
89 /**
90 * Animation to use when the alert is dismissed.
91 */
92 @Prop() leaveAnimation?: AnimationBuilder;
93
94 /**
95 * Additional classes to apply for custom CSS. If multiple classes are
96 * provided they should be separated by spaces.
97 */
98 @Prop() cssClass?: string | string[];
99
100 /**
101 * The main title in the heading of the alert.
102 */
103 @Prop() header?: string;
104
105 /**
106 * The subtitle in the heading of the alert. Displayed under the title.

Callers

nothing calls this directly

Calls 7

dismissMethod · 0.95
callButtonHandlerMethod · 0.95
createDelegateControllerFunction · 0.90
createLockControllerFunction · 0.90
createTriggerControllerFunction · 0.90
isCancelFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected