source: src/theme/overrides/components/data-grid.tsx@ 5d6f37a

main
Last change on this file since 5d6f37a was 5d6f37a, checked in by Naum Shapkarovski <naumshapkarovski@…>, 7 weeks ago

add customer

  • Property mode set to 100644
File size: 2.7 KB
Line 
1import { Theme, alpha } from '@mui/material/styles';
2import { listClasses } from '@mui/material/List';
3import { paperClasses } from '@mui/material/Paper';
4import { buttonClasses } from '@mui/material/Button';
5import { listItemIconClasses } from '@mui/material/ListItemIcon';
6import { tablePaginationClasses } from '@mui/material/TablePagination';
7//
8import { paper } from '../../css';
9
10// ----------------------------------------------------------------------
11
12export function dataGrid(theme: Theme) {
13 const paperStyles = paper({ theme, dropdown: true });
14
15 return {
16 MuiDataGrid: {
17 styleOverrides: {
18 root: {
19 borderRadius: 0,
20 borderWidth: 0,
21 [`& .${tablePaginationClasses.root}`]: {
22 borderTop: 0,
23 },
24 [`& .${tablePaginationClasses.toolbar}`]: {
25 height: 'auto',
26 },
27 },
28 cell: {
29 borderBottom: `1px dashed ${theme.palette.divider}`,
30 },
31 selectedRowCount: {
32 whiteSpace: 'nowrap',
33 },
34 columnSeparator: {
35 color: theme.palette.divider,
36 },
37 toolbarContainer: {
38 padding: theme.spacing(2),
39 borderBottom: `1px dashed ${theme.palette.divider}`,
40 backgroundColor: theme.palette.background.neutral,
41 },
42 paper: {
43 ...paperStyles,
44 padding: 0,
45 },
46 menu: {
47 [`& .${paperClasses.root}`]: {
48 ...paperStyles,
49 },
50 [`& .${listClasses.root}`]: {
51 padding: 0,
52 [`& .${listItemIconClasses.root}`]: {
53 minWidth: 0,
54 marginRight: theme.spacing(2),
55 },
56 },
57 },
58 columnHeaders: {
59 borderRadius: 0,
60 backgroundColor: theme.palette.background.neutral,
61 },
62 panelHeader: {
63 padding: theme.spacing(2),
64 },
65 panelFooter: {
66 padding: theme.spacing(2),
67 justifyContent: 'flex-end',
68 borderTop: `dashed 1px ${theme.palette.divider}`,
69 [`& .${buttonClasses.root}`]: {
70 '&:first-of-type': {
71 border: `solid 1px ${alpha(theme.palette.grey[500], 0.24)}`,
72 },
73 '&:last-of-type': {
74 marginLeft: theme.spacing(1.5),
75 color: theme.palette.background.paper,
76 backgroundColor: theme.palette.text.primary,
77 },
78 },
79 },
80 filterForm: {
81 padding: theme.spacing(2),
82 },
83 filterFormValueInput: {
84 marginLeft: theme.spacing(2),
85 },
86 filterFormColumnInput: {
87 marginLeft: theme.spacing(2),
88 },
89 filterFormOperatorInput: {
90 marginLeft: theme.spacing(2),
91 },
92 },
93 },
94 };
95}
Note: See TracBrowser for help on using the repository browser.