UNPKG

1.31 kBTypeScriptView Raw
1import React, { ReactNode } from 'react';
2export declare type DateUnit = 'second' | 'minutes' | 'hours' | 'day' | 'week' | 'month' | 'year' | 'decade' | 'century';
3export interface CalendarViewProps {
4 id: string;
5 className?: string;
6 children?: ReactNode;
7 focusedItem: Date;
8 onKeyDown: React.KeyboardEventHandler<HTMLTableElement>;
9 'aria-labelledby': string;
10}
11declare function CalendarView({ className, focusedItem, onKeyDown, children, 'aria-labelledby': labelledby, }: CalendarViewProps): JSX.Element;
12declare namespace CalendarView {
13 var Body: (props: React.AllHTMLAttributes<HTMLTableSectionElement>) => JSX.Element;
14 var Row: (props: React.AllHTMLAttributes<HTMLTableRowElement>) => JSX.Element;
15 var Cell: typeof CalendarViewCell;
16}
17interface CellProps {
18 onChange(date: Date): void;
19 now?: Date;
20 min: Date;
21 max: Date;
22 date: Date;
23 unit: DateUnit;
24 disabled?: boolean;
25 selected?: Date | null;
26 focusedItem?: Date;
27 viewUnit: 'month' | 'year' | 'decade' | 'century';
28 children?: ReactNode;
29 label: string;
30}
31declare function CalendarViewCell({ onChange, min, max, date, unit, disabled, selected, focusedItem, viewUnit, children, label, }: CellProps): JSX.Element;
32export default CalendarView;
33//# sourceMappingURL=CalendarView.d.ts.map
\No newline at end of file