UNPKG

@abbl/material-calendar

Version:

Calendar component build with React and Material-UI

21 lines (20 loc) 797 B
import CalendarEvent from '../../../common/api/CalendarEvent'; import { EventStorageContextStructure } from '../../../common/contexts/EventStorageContext'; import ViewContextStructure from '../../../common/contexts/ViewContext'; export interface UseCalendarEventStorageProps { onDataRequest: (from: Date, till: Date) => Promise<CalendarEvent[]>; eventStorageContext: EventStorageContextStructure; viewContext: ViewContextStructure; } /** * Hook responsible for loading data into EventStorage. * * Returns interface which user can use to manipulate * the storage. */ export default function useCalendarEventStorage(props: UseCalendarEventStorageProps): { /** * Forces EventStorage to request data once again. */ forceReload(calendarEvent?: []): Promise<void>; };