mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
@ -1,7 +1,7 @@
|
||||
import { Component, Element, Prop } from '@stencil/core';
|
||||
|
||||
import { Color, CssClassMap, Mode } from '../../interface';
|
||||
import { createColorClasses } from '../../utils/theme';
|
||||
import { Color, CssClassMap, Mode, RouterDirection } from '../../interface';
|
||||
import { createColorClasses, openURL } from '../../utils/theme';
|
||||
|
||||
@Component({
|
||||
tag: 'ion-fab-button',
|
||||
@ -14,6 +14,8 @@ import { createColorClasses } from '../../utils/theme';
|
||||
export class FabButton {
|
||||
private inList = false;
|
||||
|
||||
@Prop({ context: 'window' }) win!: Window;
|
||||
|
||||
@Element() el!: HTMLElement;
|
||||
|
||||
/**
|
||||
@ -39,6 +41,12 @@ export class FabButton {
|
||||
*/
|
||||
@Prop() disabled = false;
|
||||
|
||||
/**
|
||||
* When using a router, it specifies the transition direction when navigating to
|
||||
* another page using `href`.
|
||||
*/
|
||||
@Prop() routerDirection?: RouterDirection;
|
||||
|
||||
/**
|
||||
* Contains a URL or a URL fragment that the hyperlink points to.
|
||||
* If this property is set, an anchor tag will be rendered.
|
||||
@ -94,6 +102,7 @@ export class FabButton {
|
||||
class="fab-button-native"
|
||||
disabled={this.disabled}
|
||||
href={this.href}
|
||||
onClick={ev => openURL(this.win, this.href, ev, this.routerDirection)}
|
||||
>
|
||||
<span class="fab-button-close-icon">
|
||||
<ion-icon name="close" lazy={false}></ion-icon>
|
||||
|
Reference in New Issue
Block a user