mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
refactor(all): update to one (part 3) (#18874)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Component, ComponentInterface, h } from '@stencil/core';
|
||||
import { Component, ComponentInterface, Host, h } from '@stencil/core';
|
||||
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
|
||||
@ -9,15 +9,11 @@ import { getIonMode } from '../../global/ionic-global';
|
||||
})
|
||||
export class Thumbnail implements ComponentInterface {
|
||||
|
||||
hostData() {
|
||||
const mode = getIonMode(this);
|
||||
return {
|
||||
class: {
|
||||
[mode]: true,
|
||||
}
|
||||
};
|
||||
}
|
||||
render() {
|
||||
return <slot></slot>;
|
||||
return (
|
||||
<Host class={getIonMode(this)}>
|
||||
<slot></slot>
|
||||
</Host>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user