💄(react) make the checkboxes column the smallest
QA feedbacks told us that the checkbox column was too wide, this update makes it the smallest possible.
This commit is contained in:
5
.changeset/cool-dingos-invent.md
Normal file
5
.changeset/cool-dingos-invent.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@openfun/cunningham-react": minor
|
||||
---
|
||||
|
||||
make the DataGrid checkboxes column the smallest possible
|
||||
@@ -117,6 +117,11 @@
|
||||
background-color: var(--c--theme--colors--greyscale-000);
|
||||
}
|
||||
|
||||
.c__datagrid__row__cell--select, .c__datagrid__header--select {
|
||||
width: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -165,7 +165,14 @@ export const DataGrid = <T extends Row>({
|
||||
<tr key={headerGroup.id}>
|
||||
{headerGroup.headers.map((header) => {
|
||||
return (
|
||||
<th key={header.id} colSpan={header.colSpan}>
|
||||
<th
|
||||
key={header.id}
|
||||
colSpan={header.colSpan}
|
||||
className={classNames({
|
||||
"c__datagrid__header--select":
|
||||
header.id === "select",
|
||||
})}
|
||||
>
|
||||
{header.isPlaceholder ? null : (
|
||||
<div
|
||||
className={classNames(
|
||||
@@ -198,9 +205,10 @@ export const DataGrid = <T extends Row>({
|
||||
arrow_drop_down
|
||||
</span>
|
||||
)}
|
||||
{!header.column.getIsSorted() && (
|
||||
<span className="c__datagrid__header__icon-placeholder" />
|
||||
)}
|
||||
{header.id !== "select" &&
|
||||
!header.column.getIsSorted() && (
|
||||
<span className="c__datagrid__header__icon-placeholder" />
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</th>
|
||||
@@ -227,6 +235,8 @@ export const DataGrid = <T extends Row>({
|
||||
"c__datagrid__row__cell--highlight": highlight,
|
||||
"c__datagrid__row__cell--actions":
|
||||
cell.column.id === "actions",
|
||||
"c__datagrid__row__cell--select":
|
||||
cell.column.id === "select",
|
||||
})}
|
||||
>
|
||||
{flexRender(
|
||||
|
||||
Reference in New Issue
Block a user