mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
perf(all): minify better by using arrow functions (#18730)
This commit is contained in:
@ -9,11 +9,11 @@ const TRANSLATEX = 'translateX';
|
||||
const CENTER = '0%';
|
||||
const OFF_OPACITY = 0.8;
|
||||
|
||||
export function shadow<T extends Element>(el: T): ShadowRoot | T {
|
||||
export const shadow = <T extends Element>(el: T): ShadowRoot | T => {
|
||||
return el.shadowRoot || el;
|
||||
}
|
||||
};
|
||||
|
||||
export function iosTransitionAnimation(AnimationC: Animation, navEl: HTMLElement, opts: TransitionOptions): Promise<Animation> {
|
||||
export const iosTransitionAnimation = (AnimationC: Animation, navEl: HTMLElement, opts: TransitionOptions): Promise<Animation> => {
|
||||
|
||||
const isRTL = (navEl.ownerDocument as any).dir === 'rtl';
|
||||
const OFF_RIGHT = isRTL ? '-99.5%' : '99.5%';
|
||||
@ -228,4 +228,4 @@ export function iosTransitionAnimation(AnimationC: Animation, navEl: HTMLElement
|
||||
}
|
||||
// Return the rootTransition promise
|
||||
return Promise.resolve(rootTransition);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user