@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next'
4
4
import { Box , Typography } from '@mui/material'
5
5
import { DataGrid , GridColDef , GridRenderCellParams } from '@mui/x-data-grid'
6
6
import { observer } from 'mobx-react'
7
-
7
+ import { styled } from '@mui/material/styles'
8
8
import { routes } from 'common/routes'
9
9
import GridActions from 'components/admin/GridActions'
10
10
import { CampaignTypesResponse } from 'gql/campaign-types'
@@ -15,6 +15,18 @@ import { ModalStore } from '../CampaignTypesPage'
15
15
import DetailsModal from './DetailsModal'
16
16
import DeleteModal from './DeleteModal'
17
17
18
+ const StyledDataGrid = styled ( DataGrid ) ( {
19
+ background : theme . palette . common . white ,
20
+ position : 'absolute' ,
21
+ height : 'calc(100vh - 300px)' ,
22
+ border : 'none' ,
23
+ width : 'calc(100% - 48px)' ,
24
+ left : '24px' ,
25
+ overflowY : 'auto' ,
26
+ overflowX : 'hidden' ,
27
+ borderRadius : '0 0 13px 13px' ,
28
+ } )
29
+
18
30
export default observer ( function Grid ( ) {
19
31
const [ paginationModel , setPaginationModel ] = useState ( {
20
32
pageSize : 10 ,
@@ -82,18 +94,7 @@ export default observer(function Grid() {
82
94
return (
83
95
< >
84
96
< Box sx = { { marginTop : '2%' , mx : 'auto' , width : 700 } } >
85
- < DataGrid
86
- style = { {
87
- background : theme . palette . common . white ,
88
- position : 'absolute' ,
89
- height : 'calc(100vh - 300px)' ,
90
- border : 'none' ,
91
- width : 'calc(100% - 48px)' ,
92
- left : '24px' ,
93
- overflowY : 'auto' ,
94
- overflowX : 'hidden' ,
95
- borderRadius : '0 0 13px 13px' ,
96
- } }
97
+ < StyledDataGrid
97
98
rows = { data || [ ] }
98
99
columns = { columns }
99
100
pageSizeOptions = { [ 5 , 10 ] }
0 commit comments