UNPKG

@state-less/leap-frontend

Version:

A collection of open source fullstack services powered by React Server

48 lines (47 loc) 1.06 kB
import React from 'react'; type State = { menuOpen: boolean; animatedBackground: number; messages: { message: string; action?: () => void; }[]; alerts: Record<string, string[]>; history: HistoryAction[]; fullscreen: boolean; search: string; searchDistance: number; showBC?: boolean; }; type HistoryAction = { action: string; value: any; reverse: () => void; }; export declare enum Actions { TOGGLE_MENU = 0, SET_BG = 1, CHOOSE_BG = 2, TOGGLE_ANIMATED_BACKGROUND = 3, SHOW_MESSAGE = 4, HIDE_MESSAGE = 5, RECORD_CHANGE = 6, REVERT_CHANGE = 7, TOGGLE_FULLSCREEN = 8, SEARCH = 9, SET_SEARCH_DISTANCE = 10, SET_LAST_BC = 11 } export declare const stateContext: React.Context<{ state: State; dispatch: React.Dispatch<any>; }>; export type Action = { type: Actions; value: any; action?: () => void; }; export declare const StateProvider: ({ children }: { children: any; }) => import("react/jsx-runtime").JSX.Element; export {};