1 line
1.7 KiB
JSON
1 line
1.7 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar Table = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n striped = _ref.striped,\n bordered = _ref.bordered,\n borderless = _ref.borderless,\n hover = _ref.hover,\n size = _ref.size,\n variant = _ref.variant,\n responsive = _ref.responsive,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"className\", \"striped\", \"bordered\", \"borderless\", \"hover\", \"size\", \"variant\", \"responsive\"]);\n\n var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'table');\n var classes = classNames(className, decoratedBsPrefix, variant && decoratedBsPrefix + \"-\" + variant, size && decoratedBsPrefix + \"-\" + size, striped && decoratedBsPrefix + \"-striped\", bordered && decoratedBsPrefix + \"-bordered\", borderless && decoratedBsPrefix + \"-borderless\", hover && decoratedBsPrefix + \"-hover\");\n var table = React.createElement(\"table\", _extends({}, props, {\n className: classes,\n ref: ref\n }));\n\n if (responsive) {\n var responsiveClass = decoratedBsPrefix + \"-responsive\";\n\n if (typeof responsive === 'string') {\n responsiveClass = responsiveClass + \"-\" + responsive;\n }\n\n return React.createElement(\"div\", {\n className: responsiveClass\n }, table);\n }\n\n return table;\n});\nexport default Table;","map":null,"metadata":{},"sourceType":"module"} |