@sberdevices/plasma-temple
Version:
SberDevices CanvasApp Templates.
28 lines • 1.05 kB
TypeScript
/// <reference types="react" />
import { HeaderProps } from '@sberdevices/plasma-ui/components/Header/Header';
import { AppState, PlasmaActionData, History } from '../../store/types';
export interface AppStateContextValue {
state: AppState;
header?: HeaderProps;
dispatch: React.Dispatch<PlasmaActionData>;
pushHistory: <N extends string, P>(name: N, data: P) => void;
pushScreen: {
<N extends string, P>(name: N, params: P): void;
<N extends string>(name: N, params?: never): void;
};
replacePreviousScreens: {
<N extends string, P>(screens: Array<{
name: N;
params?: P;
}>): void;
<N extends string>(screens: Array<{
name: N;
params?: never;
}>): void;
};
popScreen: () => void;
goToScreen: <N extends string>(name: N) => void;
changeActiveScreenState: (state: History) => void;
}
export declare const AppStateContext: import("react").Context<AppStateContextValue>;
//# sourceMappingURL=AppStateContext.d.ts.map