UNPKG

@verbpatch/svelte-calendar

Version:

A headless calendar library for svelte applications with full event management and drag-and-drop support

3 lines (2 loc) 682 B
import{writable as n}from"svelte/store";import{useCalendar as e}from"@verbpatch/headless-calendar";export*from"@verbpatch/headless-calendar";function o(o){const l=n(null),a=()=>{const n=e(Object.assign(Object.assign({},o),{onEvent:n=>{var e;console.log("onEvent:",n),a(),null===(e=null==o?void 0:o.onEvent)||void 0===e||e.call(o,n)},onDateChange:n=>{var e;console.log("onDateChange:",n),a(),null===(e=null==o?void 0:o.onDateChange)||void 0===e||e.call(o,n)},onViewChange:n=>{var e;console.log("onViewChange:",n),a(),null===(e=null==o?void 0:o.onViewChange)||void 0===e||e.call(o,n)}}));return l.set(n),n};return a(),l}export{o as useCalendar}; //# sourceMappingURL=index.esm.js.map