Skip to content
Permalink
Browse files

feat: add support for table-borderless, fixes #3470 (#3473)

  • Loading branch information
dpisklov authored and jquense committed Feb 15, 2019
1 parent 24b094d commit 22e93163cf17cff8df27b30da8fc7a124295cec8
Showing with 11 additions and 0 deletions.
  1. +7 −0 src/Table.js
  2. +4 −0 test/TableSpec.js
@@ -21,6 +21,11 @@ class Table extends React.Component {
*/
bordered: PropTypes.bool,

/**
* Removes all borders on the table and cells, including table header.
*/
borderless: PropTypes.bool,

/**
* Enable a hover state on table rows within a `<tbody>`.
*/
@@ -56,6 +61,7 @@ class Table extends React.Component {
className,
striped,
bordered,
borderless,
hover,
size,
variant,
@@ -70,6 +76,7 @@ class Table extends React.Component {
size && `${bsPrefix}-${size}`,
striped && `${bsPrefix}-striped`,
bordered && `${bsPrefix}-bordered`,
borderless && `${bsPrefix}-borderless`,
hover && `${bsPrefix}-hover`,
);

@@ -20,6 +20,10 @@ describe('Table', () => {
mount(<Table bordered />).assertSingle('table.table-bordered');
});

it('Should have correct class when borderless', () => {
mount(<Table borderless />).assertSingle('table.table-borderless');
});

it('Should have correct class when small', () => {
mount(<Table size="sm" />).assertSingle('table.table-sm');
});

0 comments on commit 22e9316

Please sign in to comment.
You can’t perform that action at this time.