@@ -38,13 +38,15 @@ export interface CatalogFilterSidebarProps {
3838 setData : ( callback : ( prevFilters : FilterValues ) => FilterValues ) => void ;
3939 lists : FilterList [ ] ;
4040 value ?: FilterValues ;
41+ styleProps ?: StyleProps ;
4142}
4243
4344export type FilterValues = Record < string , string | string [ ] > ;
4445
4546export interface StyleProps {
4647 backgroundColor ?: string ;
4748 sectionTitleBackgroundColor ?: string ;
49+ fontFamily ?: string ;
4850}
4951
5052/**
@@ -57,7 +59,8 @@ export interface StyleProps {
5759const CatalogFilterSidebar : React . FC < CatalogFilterSidebarProps > = ( {
5860 lists,
5961 setData,
60- value = { }
62+ value = { } ,
63+ styleProps
6164} ) => {
6265 const theme = useTheme ( ) ; // Get the current theme
6366 const [ openDrawer , setOpenDrawer ] = useState < boolean > ( false ) ;
@@ -70,23 +73,29 @@ const CatalogFilterSidebar: React.FC<CatalogFilterSidebarProps> = ({
7073 setOpenDrawer ( false ) ;
7174 } , [ ] ) ;
7275
73- const styleProps : StyleProps = {
76+ const defaultStyleProps : StyleProps = {
7477 backgroundColor :
7578 theme . palette . mode === 'light'
7679 ? theme . palette . background . default
7780 : theme . palette . background . secondary ,
7881 sectionTitleBackgroundColor :
79- theme . palette . mode === 'light' ? theme . palette . background . surfaces : darkTeal . main
82+ theme . palette . mode === 'light' ? theme . palette . background . surfaces : darkTeal . main ,
83+ fontFamily : theme . typography . fontFamily
84+ } ;
85+
86+ const appliedStyleProps = {
87+ ...defaultStyleProps ,
88+ ...styleProps
8089 } ;
8190
8291 return (
8392 < >
84- < FiltersCardDiv styleProps = { styleProps } >
93+ < FiltersCardDiv styleProps = { appliedStyleProps } >
8594 < CatalogFilterSidebarState
8695 lists = { lists }
8796 onApplyFilters = { setData }
8897 value = { value }
89- styleProps = { styleProps }
98+ styleProps = { appliedStyleProps }
9099 />
91100 </ FiltersCardDiv >
92101 < FilterDrawerDiv >
@@ -126,7 +135,7 @@ const CatalogFilterSidebar: React.FC<CatalogFilterSidebarProps> = ({
126135 lists = { lists }
127136 onApplyFilters = { setData }
128137 value = { value }
129- styleProps = { styleProps }
138+ styleProps = { appliedStyleProps }
130139 />
131140 </ Box >
132141 < Box sx = { { backgroundColor : SLIGHT_BLUE , height : '5vh' } } />
0 commit comments