UNPKG

@ntragas/pouncejstest

Version:

A collection of UI components from Panther labs

25 lines (22 loc) 916 B
import React from 'react'; import { NativeAttributes } from '../../system'; import { __DEV__ } from '../../utils/helpers'; // eslint-disable-next-line @typescript-eslint/no-explicit-any /** * Responsive box-model layout component. Apart from the defined props, * it also supports all the native HTML attributes. * */ // @ts-nocheck var Box = /*#__PURE__*/React.forwardRef(function Box(_ref, ref) { var children = _ref.children, _ref$as = _ref.as, As = _ref$as === void 0 ? 'div' : _ref$as; return /*#__PURE__*/React.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 export default Box; if (__DEV__) { Box.displayName = 'Box'; }