@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) • 780 B
TypeScript
import { Dispatch } from "react";
import { ComponentType } from "../../../state/context/context";
import { Action } from "./reducer";
import { BooleanState, InitialBooleanState } from "./state";
export type BooleanHookOptions = {
initialState?: InitialBooleanState;
};
export declare const getUseBooleanState: (componentType: ComponentType.Switch | ComponentType.Checkbox) => (id: string, options?: BooleanHookOptions) => {
state: BooleanState;
dispatch: Dispatch<Action>;
};
export declare const useSwitchState: (id: string, options?: BooleanHookOptions) => {
state: BooleanState;
dispatch: Dispatch<Action>;
};
export declare const useCheckboxState: (id: string, options?: BooleanHookOptions) => {
state: BooleanState;
dispatch: Dispatch<Action>;
};