UNPKG

@airplane/views

Version:

A React library for building Airplane views. Views components are optimized in style and functionality to produce internal apps that are easy to build and maintain.

17 lines (16 loc) 598 B
import { ComponentType } from "../../../state/context/context"; import { InputValues } from "./state"; /** * useFormState is a hook that creates and manages a Form's state on the * Airplane context */ export declare const useFormState: (id: string) => { id: string; /** The values of the form inputs as a map of input id => value. */ values: InputValues; /** Sets the values of the form inputs from a map of input id => value. */ setValues: (values: InputValues) => void; /** Resets each of the form inputs. */ reset: () => void; componentType: ComponentType; };