Skip to content

Commit

Permalink
Mim 1974 fix table component again (#1264)
Browse files Browse the repository at this point in the history
* Fixed probem with width

* Bumped version

* Small refactoring

* Made example table wider

* Fixed bug with className

* Fixed classname

* undo change example
  • Loading branch information
ssb-cgn authored Sep 2, 2024
1 parent f88a5a3 commit 0c358b0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@statisticsnorway/ssb-component-library",
"version": "2.2.12",
"version": "2.2.13",
"description": "Component library for SSB (Statistics Norway)",
"main": "lib/bundle.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Table = forwardRef<HTMLTableElement, TableProps>(({ className, caption, da

return (
<div className={`ssb-table-wrapper${isOverflowing ? ' overflowing' : ''}`} ref={tableWrapperRef}>
<table className={`ssb-table${className ?? ''}`} ref={ref}>
<table className={`ssb-table${className ? ` ${className}` : ''}`} ref={ref}>
{caption && (
<caption data-noterefs={dataNoteRefs}>
<div className='caption-wrapper' style={{ position: 'relative' }}>
Expand Down

0 comments on commit 0c358b0

Please sign in to comment.