feat: add reusable date and time picker primitives

This commit is contained in:
2026-04-11 00:02:51 -04:00
parent 1ad5603bf6
commit 82d04e7a84
17 changed files with 4023 additions and 39 deletions

15
src/hooks/use-as-ref.ts Normal file
View File

@@ -0,0 +1,15 @@
import * as React from "react";
import { useIsomorphicLayoutEffect } from "@/hooks/use-isomorphic-layout-effect";
function useAsRef<T>(props: T) {
const ref = React.useRef<T>(props);
useIsomorphicLayoutEffect(() => {
ref.current = props;
});
return ref;
}
export { useAsRef };