mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 10:01:59 +08:00
43 lines
1017 B
TypeScript
43 lines
1017 B
TypeScript
import { IonicSafeString } from '../../';
|
|
import { AnimationBuilder, Mode, TextFieldTypes } from '../../interface';
|
|
|
|
export interface AlertOptions {
|
|
header?: string;
|
|
subHeader?: string;
|
|
message?: string | IonicSafeString;
|
|
cssClass?: string | string[];
|
|
inputs?: AlertInput[];
|
|
buttons?: (AlertButton | string)[];
|
|
backdropDismiss?: boolean;
|
|
translucent?: boolean;
|
|
animated?: boolean;
|
|
|
|
mode?: Mode;
|
|
keyboardClose?: boolean;
|
|
id?: string;
|
|
|
|
enterAnimation?: AnimationBuilder;
|
|
leaveAnimation?: AnimationBuilder;
|
|
}
|
|
|
|
export interface AlertInput {
|
|
type?: TextFieldTypes | 'checkbox' | 'radio' | 'textarea';
|
|
name?: string;
|
|
placeholder?: string;
|
|
value?: any;
|
|
label?: string;
|
|
checked?: boolean;
|
|
disabled?: boolean;
|
|
id?: string;
|
|
handler?: (input: AlertInput) => void;
|
|
min?: string | number;
|
|
max?: string | number;
|
|
}
|
|
|
|
export interface AlertButton {
|
|
text: string;
|
|
role?: string;
|
|
cssClass?: string | string[];
|
|
handler?: (value: any) => boolean | void | {[key: string]: any};
|
|
}
|