UNPKG

piral-core

Version:

The core library for creating a Piral instance.

41 lines (40 loc) 1.69 kB
import * as React from 'react'; import { ComponentsState } from '../types'; /** * Gets a registered layout component by its name. * This will always return a valid component. If nothing is found * then the returned component will just return null. * @param name The name of the registered layout component. * @returns The registered layout component or an empty stub component. */ export declare function getPiralComponent<TKey extends keyof ComponentsState>(name: TKey): ComponentsState[TKey]; /** * Gets the currently registered ErrorInfo component. * By default the DefaultErrorInfo component is used. */ export declare const RegisteredErrorInfo: React.ComponentType<import("../types").ErrorInfoProps>; /** * Gets the currently registered LoadingIndicator component. * By default only Loading is rendered. */ export declare const RegisteredLoadingIndicator: React.ComponentType<import("../types").LoadingIndicatorProps>; /** * Gets the currently registered Router component. * By default the BrowserRouter is used. */ export declare const RegisteredRouter: React.ComponentType<import("../types").RouterProps>; /** * Gets the currently registered Route Switch component. * By default the DefaultRouteSwitch component is used. */ export declare const RegisteredRouteSwitch: React.ComponentType<import("../types").RouteSwitchProps>; /** * Gets the currently registered Layout component. * By default the children are rendered. */ export declare const RegisteredLayout: React.ComponentType<import("../types").LayoutProps>; /** * Gets the currently registered Debug component. * By default nothing is used. */ export declare const RegisteredDebug: React.ComponentType;