ftr-timetable
Version:
A versatile timetable component for React
68 lines (59 loc) • 1.97 kB
TypeScript
import { default as default_2 } from 'react';
export declare interface TimeTable {
locations: TimeTableLocation[];
items?: TimeTableItem[];
variant?: "horizontal" | "vertical";
startingHour?: number;
dates?: string[];
dateFormat?: string;
numberOfHours?: number;
showTimeMarker?: boolean;
styles?: TimeTableStyles;
onItemClick?: (item: TimeTableRenderedItem<any>) => void;
onLocationClick?: (location: TimeTableLocation) => void;
onDateChange?: (date: string) => void;
renderItem?: (item: TimeTableRenderedItem<any>) => default_2.ReactNode;
renderLocation?: (location: TimeTableLocation) => default_2.ReactNode;
}
export declare const TimeTable: default_2.FC<TimeTable>;
export declare interface TimeTableItem {
id: string | number;
name: string;
info?: string;
startDate: Date | string;
endDate: Date | string;
locationId?: string | number;
data?: Record<string, unknown>;
style?: default_2.CSSProperties;
className?: string;
cancelled?: boolean;
}
export declare const TimeTableItem: default_2.NamedExoticComponent<{
item: TimeTableItem;
intersections: number;
offset: number;
}>;
export declare interface TimeTableLocation {
id: string | number;
name: string;
items?: TimeTableItem[];
style?: default_2.CSSProperties;
}
export declare interface TimeTableRenderedItem<T> extends Omit<TimeTableItem, "data"> {
data?: T;
}
export declare interface TimeTableStyles {
backgroundColor?: string;
borderStyle?: string;
dateBackgroundColor?: string;
dateTextColor?: string;
datePickerBackgroundColor?: string;
itemBackgroundColor?: string;
itemHoverBackgroundColor?: string;
itemTextColor?: string;
locationBackgroundColor?: string;
locationTextColor?: string;
textColor?: string;
timeMarkerColor?: string;
}
export { }