-
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.
Styling and custom component for
DataGrid
panels (#3033)
Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
- Loading branch information
1 parent
0638df1
commit 7d8c36e
Showing
8 changed files
with
637 additions
and
129 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,27 @@ | ||
--- | ||
"@comet/admin": minor | ||
--- | ||
|
||
Add the `DataGridPanel` component to replace MUIs default `Panel` used by `DataGrid` to match the Comet DXP design | ||
|
||
It is recommended to add this component to your theme's `defaultProps` of `MuiDataGrid`. | ||
|
||
Example theme configuration for `admin/src/theme.ts`: | ||
|
||
```ts | ||
import { DataGridPanel } from "@comet/admin"; | ||
import { createCometTheme } from "@comet/admin-theme"; | ||
import type {} from "@mui/x-data-grid/themeAugmentation"; | ||
|
||
export const theme = createCometTheme({ | ||
components: { | ||
MuiDataGrid: { | ||
defaultProps: { | ||
components: { | ||
Panel: DataGridPanel, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
``` |
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": minor | ||
--- | ||
|
||
Improve the styling of the filter and columns panels of `DataGrid` |
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 |
---|---|---|
@@ -1,4 +1,16 @@ | ||
import { DataGridPanel } from "@comet/admin"; | ||
import { createCometTheme } from "@comet/admin-theme"; | ||
import type {} from "@mui/lab/themeAugmentation"; | ||
import type {} from "@mui/x-data-grid/themeAugmentation"; | ||
|
||
export const theme = createCometTheme(); | ||
export const theme = createCometTheme({ | ||
components: { | ||
MuiDataGrid: { | ||
defaultProps: { | ||
components: { | ||
Panel: DataGridPanel, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); |
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
Oops, something went wrong.