UNPKG

@nu-art/thunder

Version:

Thunder - React & Typescript based frontend framework

24 lines (23 loc) 1.36 kB
import * as React from "react"; export declare type RouteParams = { [key: string]: string | number | (() => string | number); }; export declare class RoutePath { readonly key: string; readonly path: string; readonly exact: boolean; readonly component: React.ComponentClass | string; readonly logMessage?: string; readonly label?: React.ElementType | string; readonly visible: () => boolean; readonly enabled?: () => boolean; constructor(key: string, route: string, component: React.ComponentClass | string); setLogMessage(logMessage: string): this; setLabel(label: React.ElementType | string): this; setVisible(visible: () => boolean): this; setEnabled(enabled: () => boolean): this; setExact(exact: boolean): this; compose(params?: RouteParams): string; } export declare const defaultNavLinkNode: (route: RoutePath) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>; export declare const defaultRouteNode: (route: RoutePath) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;