Skip to content

Commit

Permalink
fix(overlay): cssClasses applied to overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Apr 17, 2018
1 parent 099b3ed commit 43d7538
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
9 changes: 3 additions & 6 deletions core/src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -222,6 +218,7 @@ export class Modal implements OverlayInterface {
hostData() {
return {
'no-router': true,
class: getClassMap(this.cssClass),
style: {
zIndex: 20000 + this.overlayId,
}
Expand Down
11 changes: 4 additions & 7 deletions core/src/components/popover/popover.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -238,7 +234,8 @@ export class Popover implements OverlayInterface {
},
'no-router': true,
class: {
...themedClasses
...themedClasses,
...getClassMap(this.cssClass),
}
};
}
Expand Down

0 comments on commit 43d7538

Please sign in to comment.