mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
lint(eslint): migrate to eslint and prettier (#25046)
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
import { Component, ComponentInterface, Element, Event, EventEmitter, Host, Prop, h } from '@stencil/core';
|
||||
import type { ComponentInterface, EventEmitter } from '@stencil/core';
|
||||
import { Component, Element, Event, Host, Prop, h } from '@stencil/core';
|
||||
import { close } from 'ionicons/icons';
|
||||
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { AnimationBuilder, Color, RouterDirection } from '../../interface';
|
||||
import { AnchorInterface, ButtonInterface } from '../../utils/element-interface';
|
||||
import type { AnimationBuilder, Color, RouterDirection } from '../../interface';
|
||||
import type { AnchorInterface, ButtonInterface } from '../../utils/element-interface';
|
||||
import { createColorClasses, hostContext, openURL } from '../../utils/theme';
|
||||
|
||||
/**
|
||||
@ -16,9 +17,9 @@ import { createColorClasses, hostContext, openURL } from '../../utils/theme';
|
||||
tag: 'ion-fab-button',
|
||||
styleUrls: {
|
||||
ios: 'fab-button.ios.scss',
|
||||
md: 'fab-button.md.scss'
|
||||
md: 'fab-button.md.scss',
|
||||
},
|
||||
shadow: true
|
||||
shadow: true,
|
||||
})
|
||||
export class FabButton implements ComponentInterface, AnchorInterface, ButtonInterface {
|
||||
@Element() el!: HTMLElement;
|
||||
@ -120,25 +121,26 @@ export class FabButton implements ComponentInterface, AnchorInterface, ButtonInt
|
||||
|
||||
private onFocus = () => {
|
||||
this.ionFocus.emit();
|
||||
}
|
||||
};
|
||||
|
||||
private onBlur = () => {
|
||||
this.ionBlur.emit();
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { el, disabled, color, href, activated, show, translucent, size } = this;
|
||||
const inList = hostContext('ion-fab-list', el);
|
||||
const mode = getIonMode(this);
|
||||
const TagType = href === undefined ? 'button' : 'a' as any;
|
||||
const attrs = (TagType === 'button')
|
||||
? { type: this.type }
|
||||
: {
|
||||
download: this.download,
|
||||
href,
|
||||
rel: this.rel,
|
||||
target: this.target
|
||||
};
|
||||
const TagType = href === undefined ? 'button' : ('a' as any);
|
||||
const attrs =
|
||||
TagType === 'button'
|
||||
? { type: this.type }
|
||||
: {
|
||||
download: this.download,
|
||||
href,
|
||||
rel: this.rel,
|
||||
target: this.target,
|
||||
};
|
||||
|
||||
return (
|
||||
<Host
|
||||
@ -156,7 +158,6 @@ export class FabButton implements ComponentInterface, AnchorInterface, ButtonInt
|
||||
[`fab-button-${size}`]: size !== undefined,
|
||||
})}
|
||||
>
|
||||
|
||||
<TagType
|
||||
{...attrs}
|
||||
class="button-native"
|
||||
|
||||
Reference in New Issue
Block a user