-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Override
padding-right
of MuiTablePagination
to fix DataGrid pagi…
…nation select styling (#2396) Override `padding-right` of `MuiTablePagination` This fixes the styling of the pagination select in `DataGrid`s. Previously, the text and icon stuck together. --------- Co-authored-by: Ricky James Smith <[email protected]>
- Loading branch information
1 parent
452a12a
commit c90ae39
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@comet/admin-theme": patch | ||
--- | ||
|
||
Fix spacing between page number and chevron icon in the pagination select of `DataGrid` |
15 changes: 15 additions & 0 deletions
15
packages/admin/admin-theme/src/componentsTheme/MuiTablePagination.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { inputBaseClasses, tablePaginationClasses } from "@mui/material"; | ||
|
||
import { mergeOverrideStyles } from "../utils/mergeOverrideStyles"; | ||
import { GetMuiComponentTheme } from "./getComponentsTheme"; | ||
|
||
export const getMuiTablePagination: GetMuiComponentTheme<"MuiTablePagination"> = (component, { palette }) => ({ | ||
...component, | ||
styleOverrides: mergeOverrideStyles<"MuiTablePagination">(component?.styleOverrides, { | ||
select: { | ||
[`&.${inputBaseClasses.input}.${tablePaginationClasses.select}`]: { | ||
paddingRight: 32, | ||
}, | ||
}, | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters