@progress/kendo-react-common
Version:
React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package
23 lines (22 loc) • 690 B
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
"use client";
import * as c from "react";
const o = (e) => {
const t = c.useCallback(
() => e.current && e.current.element ? e.current.element : e.current,
[e]
);
return c.useCallback(() => {
const n = t();
return n && n.ownerDocument || document;
}, [t]);
};
export {
o as useDocument
};