import { JsonNode } from 'headless-json-editor'; import { Editor } from '../../Editor'; import { WidgetFieldProps } from './WidgetField'; import { WidgetDescription, WidgetDescriptionProps } from './WidgetDescription'; import { WidgetError, WidgetErrorProps } from './WidgetError'; export type WidgetProps = { editor: Editor | null; node?: T; options?: Partial; }; /** * Selects and renders a matching widget for the given JsonNode * * @example * import { useEditor, Widget } from '@sagold/react-json-editor'; * * function WebFormComponent() { * const editor = useEditor(options); * const node = editor.getNode(); * * return ; * } * * @param props The widget props * @param props.editor The editor instance controlling this widget * @param props.node The JsonNode to render a widget for * @param props.options Optional overrides for the node's display options * @returns matching WidgetComponent from WidgetPlugins or null */ export declare function Widget(props: WidgetProps): import("react").JSX.Element | null; export declare namespace Widget { var Field: import("react").ForwardRefExoticComponent> & { Header: ({ children }: import("./WidgetField").WidgetFieldHeaderProps) => import("react").JSX.Element | null; Error: typeof WidgetError; Description: typeof WidgetDescription; }; var Description: typeof WidgetDescription; var Error: typeof WidgetError; } export type { WidgetFieldProps, WidgetDescriptionProps, WidgetErrorProps };