koval-ui
Version:
React components collection with minimalistic design. Supports theming, layout, and input validation.
14 lines (13 loc) • 465 B
JavaScript
"use client";
import { useState as n, useEffect as p } from "react";
import { useResizeObserver as u } from "../../internal/hooks/useResizeObserverNew.js";
const r = ({ width: s, ref: t }) => {
const [i, o] = n(s), e = u(t);
return p(() => {
typeof (e == null ? void 0 : e.width) == "number" && o(e == null ? void 0 : e.width);
}, [e == null ? void 0 : e.width]), i;
};
export {
r as useResponsiveWidth
};
//# sourceMappingURL=useResponsiveWidth.js.map