UNPKG

1.41 kBTypeScriptView Raw
1import { JSXBase } from '../../stencil-public-runtime';
2import { AnimationBuilder, Mode, TextFieldTypes } from '../../interface';
3import { IonicSafeString } from '../../utils/sanitization';
4export interface AlertOptions {
5 header?: string;
6 subHeader?: string;
7 message?: string | IonicSafeString;
8 cssClass?: string | string[];
9 inputs?: AlertInput[];
10 buttons?: (AlertButton | string)[];
11 backdropDismiss?: boolean;
12 translucent?: boolean;
13 animated?: boolean;
14 mode?: Mode;
15 keyboardClose?: boolean;
16 id?: string;
17 enterAnimation?: AnimationBuilder;
18 leaveAnimation?: AnimationBuilder;
19}
20export interface AlertInput {
21 type?: TextFieldTypes | 'checkbox' | 'radio' | 'textarea';
22 name?: string;
23 placeholder?: string;
24 value?: any;
25 label?: string;
26 checked?: boolean;
27 disabled?: boolean;
28 id?: string;
29 handler?: (input: AlertInput) => void;
30 min?: string | number;
31 max?: string | number;
32 cssClass?: string | string[];
33 attributes?: AlertInputAttributes | AlertTextareaAttributes;
34 tabindex?: number;
35}
36export interface AlertTextareaAttributes extends JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement> {
37}
38export interface AlertInputAttributes extends JSXBase.InputHTMLAttributes<HTMLInputElement> {
39}
40export interface AlertButton {
41 text: string;
42 role?: string;
43 cssClass?: string | string[];
44 handler?: (value: any) => boolean | void | {
45 [key: string]: any;
46 };
47}