mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
refactor(alert): update various interfaces and exports, fix alert dismiss promise flow to work correctly
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Animation, StencilElement } from '../index';
|
||||
import { Animation, DomController, StencilElement } from '../index';
|
||||
|
||||
export function clamp(min: number, n: number, max: number) {
|
||||
return Math.max(min, Math.min(n, max));
|
||||
@@ -279,3 +279,12 @@ export function playAnimationAsync(animation: Animation): Promise<Animation> {
|
||||
animation.play();
|
||||
});
|
||||
}
|
||||
|
||||
export function domControllerAsync(domControllerFunction: Function, callback: Function) {
|
||||
return new Promise((resolve) => {
|
||||
domControllerFunction(() => {
|
||||
callback();
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
2
packages/core/src/utils/overlay-constants.ts
Normal file
2
packages/core/src/utils/overlay-constants.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
export const BACKDROP = 'backdrop';
|
||||
Reference in New Issue
Block a user