UNPKG

@orca-fe/antd-plus

Version:
42 lines (41 loc) 1.5 kB
import React from 'react'; import { defaultValueFromJsonSchema, toTypeScriptDefinition } from './utils'; import type { JsonValueType } from './defs'; export type { JsonValueType }; export interface JsonSchemaItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> { defaultValue?: JsonValueType; value?: JsonValueType; onChange?: (value: JsonValueType) => void; level?: number; open?: boolean; onOpenChange?: (open: boolean) => void; draggable?: boolean; onDrag?: (e: React.DragEvent) => void; addSiblings?: boolean; onAddChild?: () => void; onAddSiblings?: () => void; onDelete?: () => void; nameDisabled?: boolean; defaultValueDisabled?: boolean; root?: boolean; } export interface JsonSchemaEditorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> { defaultValue?: JsonValueType; value?: JsonValueType; onChange?: (value: JsonValueType) => void; level?: number; addSiblings?: boolean; onAddSiblings?: () => void; draggable?: boolean; onDrag?: () => void; onDelete?: () => void; nameDisabled?: boolean; defaultValueDisabled?: boolean; root?: boolean; } declare const JsonSchemaEditor: { (props: JsonSchemaEditorProps): import("react/jsx-runtime").JSX.Element; toTypeScriptDefinition: typeof toTypeScriptDefinition; defaultValueFromJsonSchema: typeof defaultValueFromJsonSchema; }; export default JsonSchemaEditor;