Skip to content

Commit 103c7e4

Browse files
committed
feat(table): allow table captions
1 parent 00eeb0a commit 103c7e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/table/Table.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { TableHead } from './TableHead';
33
import { TableBody } from './TableBody';
44
import { normalizeColumns } from './table-helpers';
55

6-
export function Table({ docs, columns, striped, bordered, hover, small, dark, rowClass }) {
6+
export function Table({ docs, columns, striped, bordered, hover, small, dark, rowClass, caption }) {
77
const normalizedColumns = normalizeColumns(columns);
88

99
const tableClasses = [
@@ -16,6 +16,7 @@ export function Table({ docs, columns, striped, bordered, hover, small, dark, ro
1616
].join(' ');
1717
return (
1818
<table className={tableClasses}>
19+
{caption && <caption>{caption}</caption>}
1920
<TableHead columns={normalizedColumns} />
2021
<TableBody docs={docs} columns={normalizedColumns} rowClass={rowClass} />
2122
</table>

0 commit comments

Comments
 (0)