mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user