@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.
20 lines (19 loc) • 684 B
TypeScript
import { InputComponentState } from "../../../state/context/context";
import { InputType } from "./FormProvider";
import { InputValues } from "./state";
/**
* FormInputs is the global component state and type of each form input for the nearest `Form`
* parent component.
*/
export type FormInputs = Record<string, {
state: InputComponentState;
type: InputType;
}>;
/**
* useFormInputStates returns the form's input data (state and type).
*/
export declare const useFormInputs: () => FormInputs;
/**
* adaptInputDataToValues transforms the form's inputs to more user-friendly values.
*/
export declare const adaptInputsToValues: (formInputs: FormInputs) => InputValues;