( ref: DOMRef<T> )
| 39 | } |
| 40 | |
| 41 | export function useDOMRef<T extends HTMLElement = HTMLElement>( |
| 42 | ref: DOMRef<T> |
| 43 | ): RefObject<T | null> { |
| 44 | let domRef = useRef<T>(null); |
| 45 | useImperativeHandle(ref, () => createDOMRef(domRef)); |
| 46 | return domRef; |
| 47 | } |
| 48 | |
| 49 | export function useFocusableRef<T extends HTMLElement = HTMLElement, D extends HTMLElement = T>( |
| 50 | ref: FocusableRef<T, D>, |
no test coverage detected