UNPKG

@wordpress/compose

Version:
24 lines 674 B
/** * In Dialogs/modals, the tabbing must be constrained to the content of * the wrapper element. This hook adds the behavior to the returned ref. * * @return Element Ref. * * @example * ```ts * import { useConstrainedTabbing } from '@wordpress/compose'; * * const ConstrainedTabbingExample = () => { * const constrainedTabbingRef = useConstrainedTabbing() * return ( * <div ref={ constrainedTabbingRef }> * <Button /> * <Button /> * </div> * ); * } * ``` */ declare function useConstrainedTabbing(): React.RefCallback<Element>; export default useConstrainedTabbing; //# sourceMappingURL=index.d.ts.map