UNPKG

2.57 kBTypeScriptView Raw
1import * as React from 'react';
2import { BasePickerProps } from '../typings/BasePicker';
3import { MaterialUiPickersDate } from '../typings/date';
4import { BaseTimePickerProps } from '../TimePicker/TimePicker';
5import { BaseDatePickerProps } from '../DatePicker/DatePicker';
6declare const viewsMap: {
7 year: React.FC<import("../views/Year/YearView").YearSelectionProps>;
8 month: React.FC<import("../views/Month/MonthView").MonthSelectionProps>;
9 date: React.ComponentType<Pick<React.PropsWithChildren<Pick<import("../views/Calendar/Calendar").CalendarProps, "classes" | "theme" | "onChange" | "date" | "onMonthChange" | "leftArrowIcon" | "rightArrowIcon" | "leftArrowButtonProps" | "rightArrowButtonProps" | "minDate" | "maxDate" | "disablePast" | "disableFuture" | "renderDay" | "allowKeyboardControl" | "shouldDisableDate" | "loadingIndicator">>, "children" | "onChange" | "date" | "onMonthChange" | "leftArrowIcon" | "rightArrowIcon" | "leftArrowButtonProps" | "rightArrowButtonProps" | "minDate" | "maxDate" | "disablePast" | "disableFuture" | "renderDay" | "allowKeyboardControl" | "shouldDisableDate" | "loadingIndicator"> & import("@material-ui/core/styles").StyledComponentProps<"transitionContainer" | "progressContainer" | "week">>;
10 hours: React.FC<import("../views/Clock/ClockView").TimePickerViewProps>;
11 minutes: React.FC<import("../views/Clock/ClockView").TimePickerViewProps>;
12 seconds: React.FC<import("../views/Clock/ClockView").TimePickerViewProps>;
13};
14export declare type PickerView = keyof typeof viewsMap;
15export declare type ToolbarComponentProps = BaseDatePickerProps & BaseTimePickerProps & {
16 views: PickerView[];
17 openView: PickerView;
18 date: MaterialUiPickersDate;
19 setOpenView: (view: PickerView) => void;
20 onChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void;
21 hideTabs?: boolean;
22 dateRangeIcon?: React.ReactNode;
23 timeIcon?: React.ReactNode;
24 isLandscape: boolean;
25};
26export interface PickerViewProps extends BaseDatePickerProps, BaseTimePickerProps {
27 views: PickerView[];
28 openTo: PickerView;
29 disableToolbar?: boolean;
30 ToolbarComponent: React.ComponentType<ToolbarComponentProps>;
31 hideTabs?: boolean;
32 dateRangeIcon?: React.ReactNode;
33 timeIcon?: React.ReactNode;
34}
35interface PickerProps extends PickerViewProps {
36 date: MaterialUiPickersDate;
37 orientation?: BasePickerProps['orientation'];
38 onChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void;
39}
40export declare const Picker: React.FunctionComponent<PickerProps>;
41export {};