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 1231 additions and 1235 deletions

View File

@ -1,7 +1,8 @@
import { Component, ComponentInterface, Prop, h } from '@stencil/core';
import { config } from '../../global/config';
import { getIonMode } from '../../global/ionic-global';
import { Color, Config } from '../../interface';
import { Color } from '../../interface';
import { ButtonInterface } from '../../utils/element-interface';
import { createColorClasses } from '../../utils/theme';
@ -15,8 +16,6 @@ import { createColorClasses } from '../../utils/theme';
})
export class MenuButton implements ComponentInterface, ButtonInterface {
@Prop({ context: 'config' }) config!: Config;
/**
* The color to use from your application's color palette.
* Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
@ -53,7 +52,7 @@ export class MenuButton implements ComponentInterface, ButtonInterface {
class: {
...createColorClasses(color),
[`${mode}`]: true,
[mode]: true,
'button': true, // ion-buttons target .button
'menu-button-disabled': disabled,
@ -65,7 +64,7 @@ export class MenuButton implements ComponentInterface, ButtonInterface {
render() {
const mode = getIonMode(this);
const menuIcon = this.config.get('menuIcon', 'menu');
const menuIcon = config.get('menuIcon', 'menu');
const attrs = {
type: this.type