UNPKG

@wordpress/components

Version:
15 lines (14 loc) 555 B
import { createElement } from "@wordpress/element"; /** * WordPress dependencies */ import { createHigherOrderComponent, useConstrainedTabbing } from '@wordpress/compose'; const withConstrainedTabbing = createHigherOrderComponent(WrappedComponent => function ComponentWithConstrainedTabbing(props) { const ref = useConstrainedTabbing(); return createElement("div", { ref: ref, tabIndex: "-1" }, createElement(WrappedComponent, props)); }, 'withConstrainedTabbing'); export default withConstrainedTabbing; //# sourceMappingURL=index.js.map