UNPKG

@fremtind/jkl-datepicker-react

Version:
19 lines (18 loc) 486 B
import { type Reducer } from "react"; export type CalendarAction = { type: "SET_SELECTED_DATE"; newDate: Date; } | { type: "SET_OFFSET"; newOffset: number; } | { type: "ADD_OFFSET"; addedOffset: number; }; export type CalendarState = { selectedDate: Date; offset: number; shownDate: Date; }; export declare const calendarReducer: Reducer<CalendarState, CalendarAction>; export declare const calendarInitializer: (initialDate: Date) => CalendarState;