Skip to content

Commit c122c80

Browse files
committed
Update
Signed-off-by: vr-varad <[email protected]>
1 parent e0bdb0e commit c122c80

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/custom/UniversalFilter.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Drawer, useMediaQuery } from '@mui/material';
1+
import { Drawer, styled, useMediaQuery } from '@mui/material';
22
import { SelectChangeEvent } from '@mui/material/Select';
33
import React from 'react';
44
import { Button } from '../base/Button';
@@ -9,7 +9,7 @@ import { Paper } from '../base/Paper';
99
import { Select } from '../base/Select';
1010
import { FilterIcon } from '../icons';
1111
import { useTheme } from '../theme';
12-
import { SLIGHT_BLUE } from '../theme/colors/colors';
12+
import { darkModalGradient, lightModalGradient } from '../theme/colors/colors';
1313
import PopperListener from './PopperListener';
1414
import { TooltipIcon } from './TooltipIconButton';
1515

@@ -28,6 +28,16 @@ export interface UniversalFilterProps {
2828
id: string;
2929
}
3030

31+
export const FilterHeader = styled('div')(({ theme }) => ({
32+
background: theme.palette.mode === 'light' ? lightModalGradient.fotter : darkModalGradient.fotter,
33+
padding: '0.75rem 1rem',
34+
margin: '-1rem -1rem 1rem -1rem',
35+
display: 'flex',
36+
justifyContent: 'space-between',
37+
alignItems: 'center',
38+
color: theme.palette.text.primary
39+
}));
40+
3141
function UniversalFilter({
3242
filters,
3343
selectedFilters,
@@ -68,19 +78,9 @@ function UniversalFilter({
6878

6979
const renderFilterContent = () => (
7080
<div>
71-
<div
72-
style={{
73-
backgroundColor: SLIGHT_BLUE,
74-
padding: '0.75rem 1rem',
75-
margin: '-1rem -1rem 1rem -1rem',
76-
display: 'flex',
77-
justifyContent: 'space-between',
78-
alignItems: 'center',
79-
color: theme.palette.text.primary
80-
}}
81-
>
81+
<FilterHeader>
8282
<h3>Filters: </h3>
83-
</div>
83+
</FilterHeader>
8484
{Object.keys(filters).map((filterColumn) => {
8585
const options = filters[filterColumn].options;
8686
return (

0 commit comments

Comments
 (0)