mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
feat(all): add support for configuring animations on a per-page basis (#21433)
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { Component, ComponentInterface, Element, Event, EventEmitter, Host, Prop, h } from '@stencil/core';
|
||||
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { Color, RouterDirection } from '../../interface';
|
||||
import { AnimationBuilder, Color, RouterDirection } from '../../interface';
|
||||
import { AnchorInterface, ButtonInterface } from '../../utils/element-interface';
|
||||
import { createColorClasses, hostContext, openURL } from '../../utils/theme';
|
||||
|
||||
@ -62,6 +62,12 @@ export class FabButton implements ComponentInterface, AnchorInterface, ButtonInt
|
||||
*/
|
||||
@Prop() routerDirection: RouterDirection = 'forward';
|
||||
|
||||
/**
|
||||
* When using a router, it specifies the transition animation when navigating to
|
||||
* another page using `href`.
|
||||
*/
|
||||
@Prop() routerAnimation: AnimationBuilder | undefined;
|
||||
|
||||
/**
|
||||
* Specifies where to display the linked URL.
|
||||
* Only applies when an `href` is provided.
|
||||
@ -147,7 +153,7 @@ export class FabButton implements ComponentInterface, AnchorInterface, ButtonInt
|
||||
disabled={disabled}
|
||||
onFocus={this.onFocus}
|
||||
onBlur={this.onBlur}
|
||||
onClick={(ev: Event) => openURL(href, ev, this.routerDirection)}
|
||||
onClick={(ev: Event) => openURL(href, ev, this.routerDirection, this.routerAnimation)}
|
||||
>
|
||||
<span class="close-icon">
|
||||
<ion-icon name="close" lazy={false}></ion-icon>
|
||||
|
||||
Reference in New Issue
Block a user