-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
46 lines (42 loc) · 1.28 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
declare module 'react-carousel-calendar' {
interface CalendarProviderProps {
lang?: string;
isPastClickable?: boolean;
children: React.ReactNode;
}
interface CalendarContainerProps {
width?: number;
height?: number;
cssUnit?: string;
noPadding?: boolean;
noBoxShadow?: boolean;
cStyle?: string;
}
type Action =
| { type: 'NEW_CHECK_IN'; checkin: Date }
| { type: 'CHECK_OUT_HOVER_UPDATE'; checkoutHover: Date }
| { type: 'CHECK_OUT_HOVER_DELETE' }
| { type: 'CHECK_OUT_UPDATE'; checkout: Date }
| { type: 'CHECK_IN_DELETE' }
| { type: 'CHECK_OUT_DELETE' }
| { type: 'LEFT_ARROW_CLICK' }
| { type: 'RIGHT_ARROW_CLICK' }
| { type: 'CARDS_TRANSITION_END' };
interface CalendarState {
lang?: string;
isPastClickable?: boolean;
today: Date;
checkin: Date | string;
checkout: Date | string;
checkoutHover: Date | string;
focusMonth: number;
translateX: number;
isTransitioning: boolean;
isLeft: boolean;
}
function Calendar(): JSX.Element;
function CalendarProvider(props: CalendarProviderProps): JSX.Element;
function CalendarContainer(props: CalendarContainerProps): JSX.Element;
function useCalendarState(): CalendarState;
function useCalendarDispatch(): Dispatch<Action>;
}