UNPKG

@canard/schema-form

Version:

React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components

12 lines (11 loc) 1.35 kB
export type { FormChildrenProps, FormProps, FormHandle } from './type'; export type { FormErrorProps, FormGroupProps, FormInputProps, FormLabelProps, FormRenderProps, } from './components'; export declare const Form: (<Schema extends import("../../types").JsonSchema, Value extends import("../../types").AllowedValue = import("../../types").InferValueType<Schema>>(props: import("./type").FormProps<Schema, Value> & { ref?: import("react").ForwardedRef<import("./type").FormHandle<Schema, Value>>; }) => import("react").ReactNode) & { Render: ({ path, FormTypeInput: InputFormTypeInput, Wrapper: InputWrapper, children, ...restProps }: import("./components").FormRenderProps) => import("react/jsx-runtime").JSX.Element; Group: ({ path, FormTypeInput: InputFormTypeInput, FormTypeRenderer: InputFormTypeRenderer, Wrapper: InputWrapper, ...restProps }: import("./components").FormGroupProps) => import("react/jsx-runtime").JSX.Element; Label: ({ path, style, className }: import("./components").FormLabelProps) => import("react/jsx-runtime").JSX.Element; Input: ({ path, FormTypeInput: InputFormTypeInput, ...restProps }: import("./components").FormInputProps) => import("react/jsx-runtime").JSX.Element; Error: ({ path, style, className }: import("./components").FormErrorProps) => import("react/jsx-runtime").JSX.Element; };