clickable-json
Version:
Interactive JSON and JSON CRDT viewer and editor
16 lines (15 loc) • 573 B
TypeScript
import * as React from 'react';
export interface FocusContextValue {
focused: string | null;
pointed: string | null;
focus: (node: string | null) => void;
point: (node: string | null) => void;
}
export declare const context: React.Context<FocusContextValue>;
export declare const useFocus: () => FocusContextValue;
export declare const useIsFocused: (node: string) => boolean;
export interface FocusProviderProps {
children: React.ReactNode;
onFocus?: (id: string | null) => void;
}
export declare const FocusProvider: React.FC<FocusProviderProps>;