refactor(all): updating to newest stencil apis (#18578)

* chore(): update ionicons

* refactor(all): updating to newest stencil apis

* fix lint issues

* more changes

* moreee

* fix treeshaking

* fix config

* fix checkbox

* fix stuff

* chore(): update ionicons

* fix linting errors
This commit is contained in:
Manu MA
2019-06-23 11:26:42 +02:00
committed by GitHub
parent 78e477b2a7
commit 34dfc3ce98
112 changed files with 1229 additions and 1233 deletions

View File

@ -18,8 +18,6 @@ import { createColorClasses, openURL } from '../../utils/theme';
})
export class Card implements ComponentInterface, AnchorInterface, ButtonInterface {
@Prop({ context: 'window' }) win!: Window;
/**
* The color to use from your application's color palette.
* Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
@ -83,7 +81,7 @@ export class Card implements ComponentInterface, AnchorInterface, ButtonInterfac
const mode = getIonMode(this);
return {
class: {
[`${mode}`]: true,
[mode]: true,
...createColorClasses(this.color),
'card-disabled': this.disabled,
@ -101,7 +99,7 @@ export class Card implements ComponentInterface, AnchorInterface, ButtonInterfac
];
}
const mode = getIonMode(this);
const { href, win, routerDirection } = this;
const { href, routerDirection } = this;
const TagType = clickable ? (href === undefined ? 'button' : 'a') : 'div' as any;
const attrs = (TagType === 'button')
? { type: this.type }
@ -117,7 +115,7 @@ export class Card implements ComponentInterface, AnchorInterface, ButtonInterfac
{...attrs}
class="card-native"
disabled={this.disabled}
onClick={(ev: Event) => openURL(win, href, ev, routerDirection)}
onClick={(ev: Event) => openURL(href, ev, routerDirection)}
>
<slot></slot>
{clickable && mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}