Skip to content

Commit 22e9316

Browse files
dpisklovjquense
authored andcommitted
feat: add support for table-borderless, fixes react-bootstrap#3470 (react-bootstrap#3473)
1 parent 24b094d commit 22e9316

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/Table.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ class Table extends React.Component {
2121
*/
2222
bordered: PropTypes.bool,
2323

24+
/**
25+
* Removes all borders on the table and cells, including table header.
26+
*/
27+
borderless: PropTypes.bool,
28+
2429
/**
2530
* Enable a hover state on table rows within a `<tbody>`.
2631
*/
@@ -56,6 +61,7 @@ class Table extends React.Component {
5661
className,
5762
striped,
5863
bordered,
64+
borderless,
5965
hover,
6066
size,
6167
variant,
@@ -70,6 +76,7 @@ class Table extends React.Component {
7076
size && `${bsPrefix}-${size}`,
7177
striped && `${bsPrefix}-striped`,
7278
bordered && `${bsPrefix}-bordered`,
79+
borderless && `${bsPrefix}-borderless`,
7380
hover && `${bsPrefix}-hover`,
7481
);
7582

test/TableSpec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ describe('Table', () => {
2020
mount(<Table bordered />).assertSingle('table.table-bordered');
2121
});
2222

23+
it('Should have correct class when borderless', () => {
24+
mount(<Table borderless />).assertSingle('table.table-borderless');
25+
});
26+
2327
it('Should have correct class when small', () => {
2428
mount(<Table size="sm" />).assertSingle('table.table-sm');
2529
});

0 commit comments

Comments
 (0)