-
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
- Loading branch information
1 parent
5ba64aa
commit 376ff70
Showing
6 changed files
with
454 additions
and
188 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
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,27 @@ | ||
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"; | ||
import { IntlShape } from "react-intl"; | ||
|
||
export const theme = createCometTheme(); | ||
export const getTheme = (intl: IntlShape) => | ||
createCometTheme({ | ||
components: { | ||
MuiDataGrid: { | ||
defaultProps: { | ||
localeText: { | ||
// TODO: Move this into the theme by default - once `@comet/admin-theme` has been merged with `@comet/admin` | ||
filterPanelColumns: intl.formatMessage({ id: "dataGrid.filterPanelColumns", defaultMessage: "Column" }), | ||
columnsPanelTextFieldPlaceholder: intl.formatMessage({ | ||
id: "dataGrid.columnsPanelTextFieldPlaceholder", | ||
defaultMessage: "Find column...", | ||
}), | ||
}, | ||
components: { | ||
// TODO: Move this into the theme by default - once `@comet/admin-theme` has been merged with `@comet/admin` | ||
Panel: DataGridPanel, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); |
Oops, something went wrong.