UNPKG

@kenshooui/react-tree

Version:

React Tree is a straight forward component that allows a user to display and manage a hierarchical structure of items in a clear and comfortable way.

17 lines (12 loc) 421 B
import { useRef } from "react"; const useComponentsRefs = () => { const containerRef = useRef(); const headerRef = useRef(); const inputRef = useRef(); const itemsHeight = (containerRef?.current?.clientHeight || 0) - (headerRef?.current?.clientHeight || 0) - (inputRef?.current?.clientHeight || 0); return { containerRef, headerRef, inputRef, itemsHeight }; }; export default useComponentsRefs;