UNPKG

792 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.useSelection = useSelection;
4const useMulti_js_1 = require("./selection/useMulti.js");
5const useRange_js_1 = require("./selection/useRange.js");
6const useSingle_js_1 = require("./selection/useSingle.js");
7function useSelection(props, dateLib) {
8 const single = (0, useSingle_js_1.useSingle)(props, dateLib);
9 const multi = (0, useMulti_js_1.useMulti)(props, dateLib);
10 const range = (0, useRange_js_1.useRange)(props, dateLib);
11 switch (props.mode) {
12 case "single":
13 return single;
14 case "multiple":
15 return multi;
16 case "range":
17 return range;
18 default:
19 return undefined;
20 }
21}
22//# sourceMappingURL=useSelection.js.map
\No newline at end of file