jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
37 lines (32 loc) • 898 B
JavaScript
import React__default from 'react';
import PropTypes from '../../../prop-types/index.js';
var hiddenGuard = {
width: '1px',
height: '0px',
padding: 0,
overflow: 'hidden',
position: 'fixed',
top: '1px',
left: '1px'
};
var InFocusGuard = function InFocusGuard(_ref) {
var children = _ref.children;
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
key: "guard-first",
"data-focus-guard": true,
"data-focus-auto-guard": true,
style: hiddenGuard
}), children, children && React__default.createElement("div", {
key: "guard-last",
"data-focus-guard": true,
"data-focus-auto-guard": true,
style: hiddenGuard
}));
};
InFocusGuard.propTypes = process.env.NODE_ENV !== "production" ? {
children: PropTypes.node
} : {};
InFocusGuard.defaultProps = {
children: null
};
export { hiddenGuard };