import { useEvent } from "jb-core/react"; import { RefObject } from "react"; import type {JBCalendarEventType, JBCalendarWebComponent} from 'jb-calendar'; export type EventProps = { onSelect?: (e: JBCalendarEventType) => void, } export function useEvents(element:RefObject,props:EventProps){ useEvent(element, 'select', props.onSelect); }