UNPKG

react-day-picker

Version:

Customizable Date Picker for React

37 lines (36 loc) 1.3 kB
import React, { ReactNode } from 'react'; /** Represents the value of the [[NavigationContext]]. */ export declare type FocusContextValue = { /** The day currently focused. */ focusedDay: Date | undefined; /** Day that will be focused. */ focusTarget: Date | undefined; /** Focus a day. */ focus: (day: Date) => void; /** Blur the focused day. */ blur: () => void; /** Focus the day after the focused day. */ focusDayAfter: () => void; /** Focus the day before the focused day. */ focusDayBefore: () => void; /** Focus the day in the week before the focused day. */ focusWeekBefore: () => void; /** Focus the day in the week after the focused day. */ focusWeekAfter: () => void; focusMonthBefore: () => void; focusMonthAfter: () => void; focusYearBefore: () => void; focusYearAfter: () => void; focusStartOfWeek: () => void; focusEndOfWeek: () => void; }; /** * The Focus context shares details about the focused day for the keyboard * * Access this context from the [[useFocus]] hook. */ export declare const FocusContext: React.Context<FocusContextValue | undefined>; /** The provider for the [[FocusContext]]. */ export declare function FocusProvider(props: { children: ReactNode; }): JSX.Element;