UNPKG

@wordpress/compose

Version:
24 lines 723 B
export default useConstrainedTabbing; /** * 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 {import('react').RefCallback<Element>} Element Ref. * * @example * ```js * import { useConstrainedTabbing } from '@wordpress/compose'; * * const ConstrainedTabbingExample = () => { * const constrainedTabbingRef = useConstrainedTabbing() * return ( * <div ref={ constrainedTabbingRef }> * <Button /> * <Button /> * </div> * ); * } * ``` */ declare function useConstrainedTabbing(): import("react").RefCallback<Element>; //# sourceMappingURL=index.d.ts.map