feat(react): React Router Enhancements (#21693)

This commit is contained in:
Ely Lucas
2020-07-07 11:02:05 -06:00
committed by GitHub
parent a0735b97bf
commit c171ccbd37
245 changed files with 26872 additions and 1126 deletions

View File

@ -0,0 +1 @@
export type RouteAction = 'push' | 'replace' | 'pop';

View File

@ -0,0 +1,19 @@
import { AnimationBuilder } from '@ionic/core';
import { RouteAction } from './RouteAction';
import { RouterDirection } from './RouterDirection';
export interface RouteInfo<TOptions = any> {
id: string;
lastPathname?: string;
routeAction?: RouteAction;
routeDirection?: RouterDirection;
routeAnimation?: AnimationBuilder;
routeOptions?: TOptions;
params?: {[key: string]: string | string[]};
pushedByRoute?: string;
pathname: string;
search: string;
tab?: string;
}

View File

@ -0,0 +1 @@
export type RouterDirection = 'forward' | 'back' | 'root' | 'none';

View File

@ -0,0 +1,4 @@
export interface RouterOptions {
as?: string;
unmount?: boolean;
}

View File

@ -0,0 +1,4 @@
export * from './RouteAction';
export * from './RouteInfo';
export * from './RouterDirection';
export * from './RouterOptions';