xstate-helpers
Version:
A collection of helpers for XState (with React).
29 lines (28 loc) • 1.03 kB
TypeScript
import React from 'react';
import { InspectorOptions } from '@xstate/inspect';
export declare const LOCAL_STORAGE_KEY_IS_ENABLED = "xstate-helpers::isEnabled";
export declare const LOCAL_STORAGE_KEY_OVERRIDE_OPTIONS = "xstate-helpers::overrideOptions";
declare global {
interface Window {
XStateInspector: {
enable: () => void;
disable: () => void;
overrideOptions: (options?: Partial<InspectorOptions>) => Partial<InspectorOptions>;
};
}
}
export declare type XStateInspectLoaderProps = {
/**
* Initialize as enabled when we don't have a value stored in local storage?
*/
initialIsEnabled?: boolean;
options?: Partial<InspectorOptions>;
/**
* Ignore the console interface and always enable the inspector
*/
forceEnabled?: boolean;
wrapperElement?: string | Element;
styles?: React.CSSProperties;
stylesIframe?: React.CSSProperties;
};
export declare const XStateInspectLoader: React.FC<XStateInspectLoaderProps>;