deploy: v0.12 存档迁移+考古日志滚动条

This commit is contained in:
2026-06-24 03:04:38 +00:00
parent 4831505ef9
commit b4c6111516
58986 changed files with 7569452 additions and 31667 deletions
+28
View File
@@ -0,0 +1,28 @@
import { useMulti } from "./selection/useMulti.js";
import { useRange } from "./selection/useRange.js";
import { useSingle } from "./selection/useSingle.js";
/**
* Determines the appropriate selection hook to use based on the selection mode
* and returns the corresponding selection object.
*
* @template T - The type of DayPicker props.
* @param props - The DayPicker props.
* @param dateLib - The date utility library instance.
* @returns The selection object for the specified mode, or `undefined` if no
* mode is set.
*/
export function useSelection(props, dateLib) {
const single = useSingle(props, dateLib);
const multi = useMulti(props, dateLib);
const range = useRange(props, dateLib);
switch (props.mode) {
case "single":
return single;
case "multiple":
return multi;
case "range":
return range;
default:
return undefined;
}
}