UNPKG

2.32 kBJavaScriptView Raw
1/*
2 * Copyright 2018 Palantir Technologies, Inc. All rights reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16import { __assign, __decorate, __extends, __rest } from "tslib";
17import classNames from "classnames";
18import * as React from "react";
19import { polyfill } from "react-lifecycles-compat";
20import { AbstractPureComponent2, Classes } from "../../common";
21// this component is simple enough that tests would be purely tautological.
22/* istanbul ignore next */
23var HTMLTable = /** @class */ (function (_super) {
24 __extends(HTMLTable, _super);
25 function HTMLTable() {
26 return _super !== null && _super.apply(this, arguments) || this;
27 }
28 HTMLTable.prototype.render = function () {
29 var _a;
30 // eslint-disable-next-line deprecation/deprecation
31 var _b = this.props, bordered = _b.bordered, className = _b.className, condensed = _b.condensed, elementRef = _b.elementRef, interactive = _b.interactive, small = _b.small, striped = _b.striped, htmlProps = __rest(_b, ["bordered", "className", "condensed", "elementRef", "interactive", "small", "striped"]);
32 var classes = classNames(Classes.HTML_TABLE, (_a = {},
33 _a[Classes.HTML_TABLE_BORDERED] = bordered,
34 _a[Classes.HTML_TABLE_CONDENSED] = condensed,
35 _a[Classes.HTML_TABLE_STRIPED] = striped,
36 _a[Classes.INTERACTIVE] = interactive,
37 _a[Classes.SMALL] = small,
38 _a), className);
39 // eslint-disable-next-line @blueprintjs/html-components
40 return React.createElement("table", __assign({}, htmlProps, { ref: elementRef, className: classes }));
41 };
42 HTMLTable = __decorate([
43 polyfill
44 ], HTMLTable);
45 return HTMLTable;
46}(AbstractPureComponent2));
47export { HTMLTable };
48//# sourceMappingURL=htmlTable.js.map
\No newline at end of file