UNPKG

react-year-date-picker

Version:
70 lines (68 loc) 2.77 kB
import React from "react"; type DatePickerType = { year: number | undefined; month: number | undefined; }; interface BasicCalendarProps { id?: string; className?: string; open?: boolean; axis?: { y: number; x: number; }; } interface Props extends BasicCalendarProps { month?: number; handleMonth?: (e: number) => void; calendarRef?: React.LegacyRef<HTMLDivElement>; } export const MonthCalendar: ({ axis, open, month, handleMonth, id, className, calendarRef, }: Props) => import("react/jsx-runtime").JSX.Element | null; interface _Props1 extends BasicCalendarProps { month?: number; handleMonth?: (e: number) => void; } export const MonthCalendarPortal: React.ForwardRefExoticComponent<_Props1 & React.RefAttributes<HTMLDivElement>>; interface _Props2 extends BasicCalendarProps { year?: number; handleYear?: (e: number) => void; calendarRef?: React.LegacyRef<HTMLDivElement>; } export const YearCalendar: ({ axis, open, year, handleYear, id, className, calendarRef, }: _Props2) => import("react/jsx-runtime").JSX.Element | null; interface _Props3 extends BasicCalendarProps { year?: number; handleYear?: (e: number) => void; } export const YearCalendarPortal: React.ForwardRefExoticComponent<_Props3 & React.RefAttributes<HTMLDivElement>>; interface _Props4 extends BasicCalendarProps { title?: string; date?: DatePickerType; handleYear: (e: number) => void; handleMonth: (e: number) => void; calendarRef?: React.LegacyRef<HTMLDivElement>; } export const YearMonthCalendar: ({ open, axis, date, handleYear, handleMonth, title, id, className, calendarRef, }: _Props4) => import("react/jsx-runtime").JSX.Element | null; interface _Props5 extends BasicCalendarProps { title?: string; date?: DatePickerType; handleYear: (e: number) => void; handleMonth: (e: number) => void; } export const YearMonthCalendarPortal: React.ForwardRefExoticComponent<_Props5 & React.RefAttributes<HTMLDivElement>>; interface PickerPickerProps { title?: string; type: "YEAR" | "MONTH" | "YEAR_MONTH"; locale?: string; buttonId?: string; buttonClassName?: string; calendarId?: string; calendarClassName?: string; date?: DatePickerType; year?: number; month?: number; setDate?: React.Dispatch<React.SetStateAction<DatePickerType>>; setYear?: React.Dispatch<React.SetStateAction<number | undefined>>; setMonth?: React.Dispatch<React.SetStateAction<number | undefined>>; } export const DatePicker: ({ title, type, locale, buttonId, buttonClassName, calendarId, calendarClassName, date, year, month, setDate, setYear, setMonth, }: PickerPickerProps) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=types.d.ts.map