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.

23 lines (22 loc) 1.17 kB
/// <reference types="react" /> import { ComponentType } from "../../../state/context/context"; import { InitialDatePickerState, DatePickerState } from "./state"; export type DatePickerHookOptions = { initialState?: InitialDatePickerState; }; /** * useDatePickerState is a hook that creates and manages an DatePicker's state on the * Airplane context */ export declare const getUseDatePickerState: (componentType: ComponentType.DatePicker | ComponentType.DateTimePicker) => (id: string, options?: DatePickerHookOptions) => { state: DatePickerState; dispatch: import("react").Dispatch<import("../input/reducer").InputAction<import("./reducer").DatePickerTValue>>; }; export declare const useDatePickerState: (id: string, options?: DatePickerHookOptions) => { state: DatePickerState; dispatch: import("react").Dispatch<import("../input/reducer").InputAction<import("./reducer").DatePickerTValue>>; }; export declare const useDateTimePickerState: (id: string, options?: DatePickerHookOptions) => { state: DatePickerState; dispatch: import("react").Dispatch<import("../input/reducer").InputAction<import("./reducer").DatePickerTValue>>; };