UNPKG

welcome-ui

Version:

Customizable design system with react, typescript, tailwindcss and ariakit.

23 lines (22 loc) 514 B
"use client"; import u, { useRef as o, useMemo as f } from "react"; function i(e) { return u.isValidElement(e) && Object.prototype.hasOwnProperty.call(e, "ref") ? e == null ? void 0 : e.ref : null; } function s(...e) { return (t) => { e.forEach((n) => a(n, t)); }; } function a(e, t) { e && (typeof e == "function" && t !== void 0 ? e(t) : e.current = t ?? null); } function R(e, t) { const n = o(null), r = f(() => s(e, n, t), [e, n, t]); return [n, r]; } export { i as g, s as m, R as u };