Skip to content

Commit 0c44b4e

Browse files
committed
Make datagrid compact again and fix some styling
1 parent c410ed8 commit 0c44b4e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/datagrid.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
@import "~@blueprintjs/icons/lib/css/blueprint-icons.css";
44
@import "~@blueprintjs/select/lib/css/blueprint-select.css";
55
@import "~@blueprintjs/core/lib/scss/variables";
6-
//@import "~@blueprintjs/core/src/components/html-table/_html-table.scss";
76

7+
// Since the import isn't working anymore since the Blueprint 5 migration, the following variable are copied from:
8+
// @import "~@blueprintjs/core/src/components/html-table/_html-table.scss";
89
$table-row-height: $pt-grid-size * 4 !default;
910
$table-row-height-small: $pt-grid-size * 3 !default;
1011
$table-border-width: 1px !default;
@@ -25,11 +26,11 @@ $dark-table-border-color: $pt-dark-divider-white !default;
2526

2627
// Filter cells
2728
.filter-cell {
28-
padding: 1px !important;
29+
padding: 1px 0 0 1px !important;
2930
.bp5-input {
3031
box-shadow: none;
3132
}
32-
.bp5-button:not(.bp4-minimal) {
33+
.bp5-button:not(.bp5-minimal) {
3334
box-shadow: none !important;
3435
border-radius: 0 !important;
3536
width: 100% !important;
@@ -45,7 +46,7 @@ $dark-table-border-color: $pt-dark-divider-white !default;
4546
text-align: right;
4647
}
4748
&.datagrid-cell-actions {
48-
padding: 0;
49+
padding: 1px 0 0 1px !important;
4950
}
5051
}
5152

src/datagrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const Datagrid = <T extends DataSourceType>(props: DatagridProps<T>) => {
6262

6363
return (
6464
<div className="datagrid-wrapper">
65-
<HTMLTable className="datagrid" bordered striped>
65+
<HTMLTable className="datagrid" bordered striped compact>
6666
<thead>
6767
<tr>
6868
{columns.map(col => (

0 commit comments

Comments
 (0)