mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
ion-toast-controller
ToastController is a component use to create Toast components. Please see the docs for Toast.
Methods
create(opts?: ToastOptions | undefined) => Promise<HTMLIonToastElement>
Create a toast overlay with toast options.
Parameters
| Name | Type | Description |
|---|---|---|
opts |
ToastOptions | undefined |
Returns
Type: Promise<HTMLIonToastElement>
dismiss(data?: any, role?: string | undefined, id?: string | undefined) => Promise<boolean>
Dismiss the open toast overlay.
Parameters
| Name | Type | Description |
|---|---|---|
data |
any |
|
role |
string | undefined |
|
id |
string | undefined |
Returns
Type: Promise<boolean>
getTop() => Promise<HTMLIonToastElement | undefined>
Get the most recently opened toast overlay.
Returns
Type: Promise<HTMLIonToastElement | undefined>
Built with StencilJS