mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 10:41:13 +08:00
fix(overlay): cssClasses applied to overlay
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { Component, Element, Event, EventEmitter, Listen, Method, Prop } from '@stencil/core';
|
||||
import { Animation, AnimationBuilder, ComponentProps, ComponentRef, Config, FrameworkDelegate } from '../../index';
|
||||
|
||||
import { createThemedClasses, getClassList } from '../../utils/theme';
|
||||
import { createThemedClasses, getClassMap } from '../../utils/theme';
|
||||
import { BACKDROP, OverlayEventDetail, OverlayInterface, dismiss, eventMethod, present } from '../../utils/overlays';
|
||||
import { attachComponent, detachComponent } from '../../utils/framework-delegate';
|
||||
|
||||
@ -176,11 +176,7 @@ export class Modal implements OverlayInterface {
|
||||
...this.componentProps,
|
||||
modal: this.el
|
||||
};
|
||||
const classes = [
|
||||
...getClassList(this.cssClass),
|
||||
'ion-page'
|
||||
];
|
||||
this.usersElement = await attachComponent(this.delegate, container, this.component, classes, componentProps);
|
||||
this.usersElement = await attachComponent(this.delegate, container, this.component, ['ion-page'], componentProps);
|
||||
return present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation);
|
||||
}
|
||||
|
||||
@ -222,6 +218,7 @@ export class Modal implements OverlayInterface {
|
||||
hostData() {
|
||||
return {
|
||||
'no-router': true,
|
||||
class: getClassMap(this.cssClass),
|
||||
style: {
|
||||
zIndex: 20000 + this.overlayId,
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Component, Element, Event, EventEmitter, Listen, Method, Prop } from '@stencil/core';
|
||||
import { Animation, AnimationBuilder, ComponentProps, ComponentRef, Config, FrameworkDelegate } from '../../index';
|
||||
|
||||
import { createThemedClasses, getClassList } from '../../utils/theme';
|
||||
import { createThemedClasses, getClassMap } from '../../utils/theme';
|
||||
import { BACKDROP, OverlayEventDetail, OverlayInterface, dismiss, eventMethod, present } from '../../utils/overlays';
|
||||
import { attachComponent, detachComponent } from '../../utils/framework-delegate';
|
||||
|
||||
@ -186,11 +186,7 @@ export class Popover implements OverlayInterface {
|
||||
...this.componentProps,
|
||||
popover: this.el
|
||||
};
|
||||
const classes = [
|
||||
...getClassList(this.cssClass),
|
||||
'popover-viewport'
|
||||
];
|
||||
this.usersElement = await attachComponent(this.delegate, container, this.component, classes, data);
|
||||
this.usersElement = await attachComponent(this.delegate, container, this.component, ['popover-viewport'], data);
|
||||
return present(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, this.ev);
|
||||
}
|
||||
|
||||
@ -238,7 +234,8 @@ export class Popover implements OverlayInterface {
|
||||
},
|
||||
'no-router': true,
|
||||
class: {
|
||||
...themedClasses
|
||||
...themedClasses,
|
||||
...getClassMap(this.cssClass),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user