mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
feat(base-components): add ability to remove ios and md theme (#26669)
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { printIonWarning } from '@utils/logging';
|
||||
|
||||
import { config } from '../global/config';
|
||||
import { getIonMode } from '../global/ionic-global';
|
||||
import { getIonBehavior } from '../global/ionic-global';
|
||||
import type {
|
||||
ActionSheetOptions,
|
||||
AlertOptions,
|
||||
@ -421,11 +421,11 @@ export const present = async <OverlayPresentOptions>(
|
||||
overlay.willPresent.emit();
|
||||
overlay.willPresentShorthand?.emit();
|
||||
|
||||
const mode = getIonMode(overlay);
|
||||
const platform = getIonBehavior(overlay);
|
||||
// get the user's animation fn if one was provided
|
||||
const animationBuilder = overlay.enterAnimation
|
||||
? overlay.enterAnimation
|
||||
: config.get(name, mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
||||
: config.get(name, platform === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
||||
|
||||
const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
||||
if (completed) {
|
||||
@ -505,10 +505,10 @@ export const dismiss = async <OverlayDismissOptions>(
|
||||
overlay.willDismiss.emit({ data, role });
|
||||
overlay.willDismissShorthand?.emit({ data, role });
|
||||
|
||||
const mode = getIonMode(overlay);
|
||||
const platform = getIonBehavior(overlay);
|
||||
const animationBuilder = overlay.leaveAnimation
|
||||
? overlay.leaveAnimation
|
||||
: config.get(name, mode === 'ios' ? iosLeaveAnimation : mdLeaveAnimation);
|
||||
: config.get(name, platform === 'ios' ? iosLeaveAnimation : mdLeaveAnimation);
|
||||
|
||||
// If dismissed via gesture, no need to play leaving animation again
|
||||
if (role !== GESTURE) {
|
||||
|
Reference in New Issue
Block a user