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 { Build, Component, ComponentInterface, Element, Method, Prop, h } from '@stencil/core';
import { Build, Component, ComponentInterface, Element, Host, Method, Prop, h } from '@stencil/core';
import { ComponentRef, FrameworkDelegate } from '../../interface';
import { attachComponent } from '../../utils/framework-delegate';
@ -61,20 +61,20 @@ export class Tab implements ComponentInterface {
return undefined;
}
hostData() {
const { tab, active, component } = this;
return {
'role': 'tabpanel',
'aria-hidden': !active ? 'true' : null,
'aria-labelledby': `tab-button-${tab}`,
'class': {
'ion-page': component === undefined,
'tab-hidden': !active
}
};
}
render() {
return <slot></slot>;
const { tab, active, component } = this;
return (
<Host
role="tabpanel"
aria-hidden={!active ? 'true' : null}
aria-labelledby={`tab-button-${tab}`}
class={{
'ion-page': component === undefined,
'tab-hidden': !active
}}
>
<slot></slot>
</Host>
);
}
}