refactor(all): update to one (part 3) (#18874)

This commit is contained in:
Manu MA
2019-07-25 20:22:44 +02:00
committed by GitHub
parent 9b85e13493
commit e82648bda2
105 changed files with 1249 additions and 1388 deletions

View File

@ -1,4 +1,4 @@
import { Component, ComponentInterface, Prop, h } from '@stencil/core';
import { Component, ComponentInterface, Host, Prop, h } from '@stencil/core';
import { getIonMode } from '../../global/ionic-global';
import { Color } from '../../interface';
@ -30,18 +30,19 @@ export class CardHeader implements ComponentInterface {
*/
@Prop() translucent = false;
hostData() {
render() {
const mode = getIonMode(this);
return {
class: {
...createColorClasses(this.color),
'card-header-translucent': this.translucent,
[mode]: true
}
};
return (
<Host
class={{
...createColorClasses(this.color),
'card-header-translucent': this.translucent,
[mode]: true
}}
>
<slot></slot>
</Host>
);
}
render() {
return <slot></slot>;
}
}