UNPKG

609 BJavaScriptView Raw
1import { useMulti } from "./selection/useMulti.js";
2import { useRange } from "./selection/useRange.js";
3import { useSingle } from "./selection/useSingle.js";
4export function useSelection(props, dateLib) {
5 const single = useSingle(props, dateLib);
6 const multi = useMulti(props, dateLib);
7 const range = useRange(props, dateLib);
8 switch (props.mode) {
9 case "single":
10 return single;
11 case "multiple":
12 return multi;
13 case "range":
14 return range;
15 default:
16 return undefined;
17 }
18}
19//# sourceMappingURL=useSelection.js.map
\No newline at end of file