1 | import { JSXBase } from '../../stencil-public-runtime';
|
2 | import { AnimationBuilder, Mode, TextFieldTypes } from '../../interface';
|
3 | import { IonicSafeString } from '../../utils/sanitization';
|
4 | export 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 | htmlAttributes?: AlertAttributes;
|
15 | mode?: Mode;
|
16 | keyboardClose?: boolean;
|
17 | id?: string;
|
18 | enterAnimation?: AnimationBuilder;
|
19 | leaveAnimation?: AnimationBuilder;
|
20 | }
|
21 | export interface AlertAttributes extends JSXBase.HTMLAttributes<HTMLElement> {
|
22 | }
|
23 | export interface AlertInput {
|
24 | type?: TextFieldTypes | 'checkbox' | 'radio' | 'textarea';
|
25 | name?: string;
|
26 | placeholder?: string;
|
27 | value?: any;
|
28 | label?: string;
|
29 | checked?: boolean;
|
30 | disabled?: boolean;
|
31 | id?: string;
|
32 | handler?: (input: AlertInput) => void;
|
33 | min?: string | number;
|
34 | max?: string | number;
|
35 | cssClass?: string | string[];
|
36 | attributes?: AlertInputAttributes | AlertTextareaAttributes;
|
37 | tabindex?: number;
|
38 | }
|
39 | export interface AlertTextareaAttributes extends JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
40 | }
|
41 | export interface AlertInputAttributes extends JSXBase.InputHTMLAttributes<HTMLInputElement> {
|
42 | }
|
43 | export interface AlertButton {
|
44 | text: string;
|
45 | role?: 'cancel' | 'destructive' | string;
|
46 | cssClass?: string | string[];
|
47 | id?: string;
|
48 | handler?: (value: any) => boolean | void | {
|
49 | [key: string]: any;
|
50 | };
|
51 | }
|