UNPKG

piral-core

Version:

The core library for creating a Piral instance.

24 lines (23 loc) 604 B
import * as React from 'react'; import { RouteComponentProps } from 'react-router'; /** * The props for the SetRoute component. */ export interface SetRouteProps<T extends { [K in keyof T]?: string; } = {}> { /** * The path to the route. */ path: string; /** * The component to render. */ component: React.ComponentType<RouteComponentProps<T>>; } /** * The component capable of setting a global route at mounting. */ export declare function SetRoute<T extends { [K in keyof T]?: string; } = {}>({ path, component, }: SetRouteProps<T>): React.ReactElement;