mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
fix(overlays): overlay interfaces are now exported from framework packages and documented (#23619)
resolves #22790
This commit is contained in:
@ -34,6 +34,39 @@ Any of the defined [CSS Custom Properties](#css-custom-properties) can be used t
|
||||
|
||||
> If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file. Read [Style Placement](#style-placement) in the Angular section below for more information.
|
||||
|
||||
## Interfaces
|
||||
|
||||
### ActionSheetButton
|
||||
|
||||
```typescript
|
||||
interface ActionSheetButton {
|
||||
text?: string;
|
||||
role?: 'cancel' | 'destructive' | 'selected' | string;
|
||||
icon?: string;
|
||||
cssClass?: string | string[];
|
||||
handler?: () => boolean | void | Promise<boolean | void>;
|
||||
}
|
||||
```
|
||||
|
||||
### ActionSheetOptions
|
||||
|
||||
```typescript
|
||||
interface ActionSheetOptions {
|
||||
header?: string;
|
||||
subHeader?: string;
|
||||
cssClass?: string | string[];
|
||||
buttons: (ActionSheetButton | string)[];
|
||||
backdropDismiss?: boolean;
|
||||
translucent?: boolean;
|
||||
animated?: boolean;
|
||||
mode?: Mode;
|
||||
keyboardClose?: boolean;
|
||||
id?: string;
|
||||
|
||||
enterAnimation?: AnimationBuilder;
|
||||
leaveAnimation?: AnimationBuilder;
|
||||
}
|
||||
```
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
||||
@ -41,6 +41,76 @@ Any of the defined [CSS Custom Properties](#css-custom-properties) can be used t
|
||||
|
||||
> If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file. Read [Style Placement](#style-placement) in the Angular section below for more information.
|
||||
|
||||
## Interfaces
|
||||
|
||||
### AlertButton
|
||||
|
||||
```typescript
|
||||
interface AlertButton {
|
||||
text: string;
|
||||
role?: string;
|
||||
cssClass?: string | string[];
|
||||
handler?: (value: any) => boolean | void | {[key: string]: any};
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### AlertInput
|
||||
|
||||
```typescript
|
||||
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;
|
||||
cssClass?: string | string[];
|
||||
attributes?: AlertInputAttributes | AlertTextareaAttributes;
|
||||
tabindex?: number;
|
||||
}
|
||||
```
|
||||
|
||||
### AlertInputAttributes
|
||||
|
||||
```typescript
|
||||
interface AlertInputAttributes extends JSXBase.InputHTMLAttributes<HTMLInputElement> {}
|
||||
```
|
||||
|
||||
### AlertOptions
|
||||
|
||||
```typescript
|
||||
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;
|
||||
}
|
||||
```
|
||||
|
||||
### AlertTextareaAttributes
|
||||
```typescript
|
||||
interface AlertTextareaAttributes extends JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement> {}
|
||||
```
|
||||
|
||||
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
||||
@ -37,6 +37,28 @@ Any of the defined [CSS Custom Properties](#css-custom-properties) can be used t
|
||||
|
||||
> If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file. Read [Style Placement](#style-placement) in the Angular section below for more information.
|
||||
|
||||
## Interfaces
|
||||
|
||||
### LoadingOptions
|
||||
|
||||
```typescript
|
||||
interface LoadingOptions {
|
||||
spinner?: SpinnerTypes | null;
|
||||
message?: string | IonicSafeString;
|
||||
cssClass?: string | string[];
|
||||
showBackdrop?: boolean;
|
||||
duration?: number;
|
||||
translucent?: boolean;
|
||||
animated?: boolean;
|
||||
backdropDismiss?: boolean;
|
||||
mode?: Mode;
|
||||
keyboardClose?: boolean;
|
||||
id?: string;
|
||||
|
||||
enterAnimation?: AnimationBuilder;
|
||||
leaveAnimation?: AnimationBuilder;
|
||||
}
|
||||
```
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
||||
@ -42,6 +42,30 @@ ion-modal.stack-modal {
|
||||
}
|
||||
```
|
||||
|
||||
## Interfaces
|
||||
|
||||
### ModalOptions
|
||||
|
||||
```typescript
|
||||
interface ModalOptions<T extends ComponentRef = ComponentRef> {
|
||||
component: T;
|
||||
componentProps?: ComponentProps<T>;
|
||||
presentingElement?: HTMLElement;
|
||||
showBackdrop?: boolean;
|
||||
backdropDismiss?: boolean;
|
||||
cssClass?: string | string[];
|
||||
animated?: boolean;
|
||||
swipeToClose?: boolean;
|
||||
|
||||
mode?: Mode;
|
||||
keyboardClose?: boolean;
|
||||
id?: string;
|
||||
|
||||
enterAnimation?: AnimationBuilder;
|
||||
leaveAnimation?: AnimationBuilder;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
||||
@ -2,7 +2,71 @@
|
||||
|
||||
A Picker is a dialog that displays a row of buttons and columns underneath. It appears on top of the app's content, and at the bottom of the viewport.
|
||||
|
||||
## Interfaces
|
||||
|
||||
### PickerButton
|
||||
|
||||
```typescript
|
||||
interface PickerButton {
|
||||
text?: string;
|
||||
role?: string;
|
||||
cssClass?: string | string[];
|
||||
handler?: (value: any) => boolean | void;
|
||||
}
|
||||
```
|
||||
|
||||
### PickerColumn
|
||||
|
||||
```typescript
|
||||
interface PickerColumn {
|
||||
name: string;
|
||||
align?: string;
|
||||
selectedIndex?: number;
|
||||
prevSelected?: number;
|
||||
prefix?: string;
|
||||
suffix?: string;
|
||||
options: PickerColumnOption[];
|
||||
cssClass?: string | string[];
|
||||
columnWidth?: string;
|
||||
prefixWidth?: string;
|
||||
suffixWidth?: string;
|
||||
optionsWidth?: string;
|
||||
refresh?: () => void;
|
||||
}
|
||||
```
|
||||
|
||||
### PickerColumnOption
|
||||
|
||||
```typescript
|
||||
interface PickerColumnOption {
|
||||
text?: string;
|
||||
value?: any;
|
||||
disabled?: boolean;
|
||||
duration?: number;
|
||||
transform?: string;
|
||||
selected?: boolean;
|
||||
}
|
||||
```
|
||||
|
||||
### PickerOptions
|
||||
|
||||
```typescript
|
||||
interface PickerOptions {
|
||||
columns: PickerColumn[];
|
||||
buttons?: PickerButton[];
|
||||
cssClass?: string | string[];
|
||||
showBackdrop?: boolean;
|
||||
backdropDismiss?: boolean;
|
||||
animated?: boolean;
|
||||
|
||||
mode?: Mode;
|
||||
keyboardClose?: boolean;
|
||||
id?: string;
|
||||
|
||||
enterAnimation?: AnimationBuilder;
|
||||
leaveAnimation?: AnimationBuilder;
|
||||
}
|
||||
```
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
||||
@ -34,6 +34,29 @@ Any of the defined [CSS Custom Properties](#css-custom-properties) can be used t
|
||||
|
||||
> If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file. Read [Style Placement](#style-placement) in the Angular section below for more information.
|
||||
|
||||
## Interfaces
|
||||
|
||||
### PopoverOptions
|
||||
|
||||
```typescript
|
||||
interface PopoverOptions {
|
||||
component: any;
|
||||
componentProps?: { [key: string]: any };
|
||||
showBackdrop?: boolean;
|
||||
backdropDismiss?: boolean;
|
||||
translucent?: boolean;
|
||||
cssClass?: string | string[];
|
||||
event?: Event;
|
||||
animated?: boolean;
|
||||
|
||||
mode?: 'ios' | 'md';
|
||||
keyboardClose?: boolean;
|
||||
id?: string;
|
||||
|
||||
enterAnimation?: AnimationBuilder;
|
||||
leaveAnimation?: AnimationBuilder;
|
||||
}
|
||||
```
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
||||
@ -10,6 +10,43 @@ Toasts can be positioned at the top, bottom or middle of the viewport. The posit
|
||||
|
||||
The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance.
|
||||
|
||||
## Interfaces
|
||||
|
||||
### ToastButton
|
||||
|
||||
```typescript
|
||||
interface ToastButton {
|
||||
text?: string;
|
||||
icon?: string;
|
||||
side?: 'start' | 'end';
|
||||
role?: 'cancel' | string;
|
||||
cssClass?: string | string[];
|
||||
handler?: () => boolean | void | Promise<boolean | void>;
|
||||
}
|
||||
```
|
||||
|
||||
### ToastOptions
|
||||
|
||||
```typescript
|
||||
interface ToastOptions {
|
||||
header?: string;
|
||||
message?: string | IonicSafeString;
|
||||
cssClass?: string | string[];
|
||||
duration?: number;
|
||||
buttons?: (ToastButton | string)[];
|
||||
position?: 'top' | 'bottom' | 'middle';
|
||||
translucent?: boolean;
|
||||
animated?: boolean;
|
||||
|
||||
color?: Color;
|
||||
mode?: Mode;
|
||||
keyboardClose?: boolean;
|
||||
id?: string;
|
||||
|
||||
enterAnimation?: AnimationBuilder;
|
||||
leaveAnimation?: AnimationBuilder;
|
||||
}
|
||||
```
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user