refactor(all): using ComponentInterface

This commit is contained in:
Manu Mtz.-Almeida
2018-09-14 18:45:39 +02:00
parent 9ad05d85cd
commit c49d896e08
99 changed files with 208 additions and 224 deletions

View File

@ -1,4 +1,4 @@
import { Component, Element, Event, EventEmitter, Prop, State } from '@stencil/core';
import { Component, ComponentInterface, Element, Event, EventEmitter, Prop, State } from '@stencil/core';
import { Color, CssClassMap, Mode, RouterDirection } from '../../interface';
import { hasShadowDom } from '../../utils/helpers';
@ -12,7 +12,7 @@ import { createColorClasses, openURL } from '../../utils/theme';
},
shadow: true,
})
export class Button {
export class Button implements ComponentInterface {
@Element() el!: HTMLElement;
@Prop({ context: 'window' }) win!: Window;
@ -163,7 +163,7 @@ export class Button {
};
}
protected render() {
render() {
const TagType = this.href === undefined ? 'button' : 'a';
const attrs = (TagType === 'button')