fix(): update to Stencil One 🎉🎊

This commit is contained in:
Manu MA
2019-06-19 21:33:50 +02:00
committed by GitHub
parent 7f1829eb21
commit b40f7d36d5
572 changed files with 14426 additions and 9916 deletions

View File

@ -1,9 +1,13 @@
import { Component, ComponentInterface, Element, Event, EventEmitter, Prop } from '@stencil/core';
import { Component, ComponentInterface, Element, Event, EventEmitter, Prop, h } from '@stencil/core';
import { Color, Mode, RouterDirection } from '../../interface';
import { getIonMode } from '../../global/ionic-global';
import { Color, RouterDirection } from '../../interface';
import { AnchorInterface, ButtonInterface } from '../../utils/element-interface';
import { createColorClasses, hostContext, openURL } from '../../utils/theme';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*/
@Component({
tag: 'ion-fab-button',
styleUrls: {
@ -17,11 +21,6 @@ export class FabButton implements ComponentInterface, AnchorInterface, ButtonInt
@Prop({ context: 'window' }) win!: Window;
/**
* The mode determines which platform styles to use.
*/
@Prop() mode!: Mode;
/**
* The color to use from your application's color palette.
* Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
@ -113,11 +112,12 @@ export class FabButton implements ComponentInterface, AnchorInterface, ButtonInt
hostData() {
const { el, disabled, color, activated, show, translucent, size } = this;
const inList = hostContext('ion-fab-list', el);
const mode = getIonMode(this);
return {
'aria-disabled': disabled ? 'true' : null,
class: {
...createColorClasses(color),
[`${this.mode}`]: true,
[`${mode}`]: true,
'fab-button-in-list': inList,
'fab-button-translucent-in-list': inList && translucent,
'fab-button-close-active': activated,
@ -132,6 +132,7 @@ export class FabButton implements ComponentInterface, AnchorInterface, ButtonInt
}
render() {
const mode = getIonMode(this);
const TagType = this.href === undefined ? 'button' : 'a' as any;
const attrs = (TagType === 'button')
? { type: this.type }
@ -157,7 +158,7 @@ export class FabButton implements ComponentInterface, AnchorInterface, ButtonInt
<span class="button-inner">
<slot></slot>
</span>
{this.mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
</TagType>
);
}