UNPKG

keep-vue

Version:

Keep Vue is an open-source component library built on top of Vue3 and Tailwind CSS. It offers a collection of pre-designed UI components and styles that you can easily integrate into your web applications.

14 lines (13 loc) 592 B
import { createInjectionState } from "@vueuse/core"; import {} from "vue"; const rangeCalendarStoreKey = "range-calendar-store"; const [useProvideRangeCalender, useInjectRangeCalendar] = createInjectionState((dayShape) => { return { dayShape }; }, { injectionKey: rangeCalendarStoreKey }); function useRangeCalender() { const rangeCalendarState = useInjectRangeCalendar(); if (!rangeCalendarState) throw new Error("useRangeCalender must be used within a <RangeCalendar /> Component"); return rangeCalendarState; } export { useProvideRangeCalender, useRangeCalender };