@ntragas/pouncejstest
Version:
A collection of UI components from Panther labs
36 lines (27 loc) • 1.08 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _system = require("../../system");
var _helpers = require("../../utils/helpers");
/**
* Responsive box-model layout component. Apart from the defined props,
* it also supports all the native HTML attributes.
* */
// @ts-nocheck
var Box = /*#__PURE__*/_react.default.forwardRef(function Box(_ref, ref) {
var children = _ref.children,
_ref$as = _ref.as,
As = _ref$as === void 0 ? 'div' : _ref$as;
return /*#__PURE__*/_react.default.createElement(As, {
ref: ref
}, children);
}); // FIXME: This overrides the fact that the box is a `div`. Components implementing this will warn us
// that they can't implement `<Box>` when they themselves are not a div. We should ideally fix that
// and have `ref` can be properly typed in all components
var _default = Box;
exports.default = _default;
if (_helpers.__DEV__) {
Box.displayName = 'Box';
}