💄(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);
|
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}>
|
<tr key={headerGroup.id}>
|
||||||
{headerGroup.headers.map((header) => {
|
{headerGroup.headers.map((header) => {
|
||||||
return (
|
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 : (
|
{header.isPlaceholder ? null : (
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
@@ -198,7 +205,8 @@ export const DataGrid = <T extends Row>({
|
|||||||
arrow_drop_down
|
arrow_drop_down
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{!header.column.getIsSorted() && (
|
{header.id !== "select" &&
|
||||||
|
!header.column.getIsSorted() && (
|
||||||
<span className="c__datagrid__header__icon-placeholder" />
|
<span className="c__datagrid__header__icon-placeholder" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -227,6 +235,8 @@ export const DataGrid = <T extends Row>({
|
|||||||
"c__datagrid__row__cell--highlight": highlight,
|
"c__datagrid__row__cell--highlight": highlight,
|
||||||
"c__datagrid__row__cell--actions":
|
"c__datagrid__row__cell--actions":
|
||||||
cell.column.id === "actions",
|
cell.column.id === "actions",
|
||||||
|
"c__datagrid__row__cell--select":
|
||||||
|
cell.column.id === "select",
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{flexRender(
|
{flexRender(
|
||||||
|
|||||||
Reference in New Issue
Block a user