@demark-pro/react-booking-calendar
Version:
A responsive customizable React Booking calendar with overbooking protection
46 lines (45 loc) • 2.57 kB
TypeScript
import { ComponentType } from "react";
import { CalendarContainerProps, DayContainerProps, DaysContainerProps, MonthContainerProps, WeekContainerProps } from "./containers";
import { MonthArrowBackProps } from "./MonthArrowBack";
import { MonthArrowNextProps } from "./MonthArrowNext";
import { MonthContentProps } from "./MonthContent";
import { WeekContentProps } from "./WeekContent";
import { DayContentProps } from "./DayContent";
import { DaySelectionProps } from "./DaySelection";
import { DayTodayProps } from "./DayToday";
import { DayReservationProps } from "./DayReservation";
export interface CalendarComponentsBase {
CalendarContainer: ComponentType<CalendarContainerProps>;
MonthContainer: ComponentType<MonthContainerProps>;
MonthContent: ComponentType<MonthContentProps>;
MonthArrowBack: ComponentType<MonthArrowBackProps>;
MonthArrowNext: ComponentType<MonthArrowNextProps>;
WeekContainer: ComponentType<WeekContainerProps>;
WeekContent: ComponentType<WeekContentProps>;
DaysContainer: ComponentType<DaysContainerProps>;
DayContainer: ComponentType<DayContainerProps>;
DayContent: ComponentType<DayContentProps>;
DaySelection: ComponentType<DaySelectionProps>;
DayReservation: ComponentType<DayReservationProps>;
DayToday: ComponentType<DayTodayProps>;
}
export type CalendarComponents = Partial<CalendarComponentsBase>;
export type CalendarComponentsGeneric = typeof components;
export type CalendarClassNamesBase = Record<keyof CalendarComponentsBase, string>;
export declare const componentClasses: CalendarClassNamesBase;
export declare const components: {
CalendarContainer: (props: CalendarContainerProps) => JSX.Element;
MonthContainer: (props: MonthContainerProps) => JSX.Element;
MonthContent: (props: MonthContentProps) => JSX.Element;
MonthArrowBack: (props: MonthArrowBackProps) => JSX.Element;
MonthArrowNext: (props: MonthArrowNextProps) => JSX.Element;
WeekContainer: (props: WeekContainerProps) => JSX.Element;
WeekContent: (props: WeekContentProps) => JSX.Element;
DaysContainer: (props: DaysContainerProps) => JSX.Element;
DayContainer: (props: DayContainerProps) => JSX.Element;
DayContent: (props: DayContentProps) => JSX.Element;
DaySelection: (props: DaySelectionProps) => JSX.Element | null;
DayReservation: (props: DayReservationProps) => JSX.Element | null;
DayToday: (props: DayTodayProps) => JSX.Element | null;
};
export declare const defaultComponents: (componentsByProps?: CalendarComponents) => CalendarComponentsGeneric;