import classNames from "classnames" ; import * as React from "react" ; import { polyfill } from "react-lifecycles-compat" ; import { AbstractPureComponent2 , Classes , IElementRefProps } from "../../common" ; export type HTMLTableProps = IHTMLTableProps ; deprecated export interface IHTMLTableProps extends React . TableHTMLAttributes < HTMLTableElement > , IElementRefProps < HTMLTableElement > { /** Enables borders between rows and cells. */ bordered ? : boolean ; /** Use small, condensed appearance. */ condensed ? : boolean ; /** Enables hover styles on row. */ interactive ? : boolean ; deprecated small ? : boolean ; /** Use an alternate background color on odd rows. */ striped ? : boolean ; } @ polyfill export class HTMLTable extends AbstractPureComponent2 < HTMLTableProps > { public render ( ) { const { bordered , className , condensed , elementRef , interactive , small , striped , ... htmlProps } = this . props ; const classes = classNames ( Classes . HTML_TABLE , { [ Classes . HTML_TABLE_BORDERED ] : bordered , [ Classes . HTML_TABLE_CONDENSED ] : condensed , [ Classes . HTML_TABLE_STRIPED ] : striped , [ Classes . INTERACTIVE ] : interactive , [ Classes . SMALL ] : small , } , className ) ; return < table { ... htmlProps } ref = { elementRef } className = { classes } / > ; } }