@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.
13 lines (12 loc) • 448 B
TypeScript
import { Dispatch } from "react";
import { InputAction } from "./reducer";
export type StateSetters<TValue> = {
setValue: (value: TValue) => void;
setDisabled: (disabled?: boolean) => void;
setShowErrors: (showErrors: boolean) => void;
reset: () => void;
};
export declare const useStateSetters: <TValue>(dispatch: Dispatch<InputAction<TValue>>, initialState: {
value: TValue;
disabled: boolean;
}) => StateSetters<TValue>;