@@ -200,16 +200,13 @@ export const MobileNavigation: React.FC<MobileNavigationProps> = ({ isOpen, onCl
200200 ) ;
201201} ;
202202
203- const StyledDrawer = styled ( Drawer ) < { isMainPath ?: boolean } > ( ( { isMainPath = true } ) => ( {
203+ const StyledDrawer = styled ( Drawer ) < { isMainPath ?: boolean } > ( ( { theme , isMainPath = true } ) => ( {
204204 "& .MuiDrawer-paper" : {
205205 width : "70vw" ,
206- background : isMainPath
207- ? `linear-gradient(0deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
208- linear-gradient(0deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15))`
209- : "#B6D8D7" ,
206+ background : isMainPath ? theme . palette . mobileNavigation . main . background : theme . palette . mobileNavigation . sub . background ,
210207 backdropFilter : isMainPath ? "blur(10px)" : "none" ,
211208 WebkitBackdropFilter : isMainPath ? "blur(10px)" : "none" ,
212- color : isMainPath ? "white" : "rgba(18, 109, 127, 0.9)" ,
209+ color : isMainPath ? theme . palette . mobileNavigation . main . text : theme . palette . mobileNavigation . sub . text ,
213210 borderTopRightRadius : 15 ,
214211 borderBottomRightRadius : 15 ,
215212 } ,
@@ -246,31 +243,31 @@ const MenuItem = styled(Box)<{ isMainPath?: boolean }>({
246243 gap : 23 ,
247244} ) ;
248245
249- const MenuLink = styled ( Link ) < { isMainPath ?: boolean } > ( ( { isMainPath = true } ) => ( {
250- color : isMainPath ? "white" : "rgba(18, 109, 127, 0.9)" ,
246+ const MenuLink = styled ( Link ) < { isMainPath ?: boolean } > ( ( { theme , isMainPath = true } ) => ( {
247+ color : isMainPath ? theme . palette . mobileNavigation . main . text : theme . palette . mobileNavigation . sub . text ,
251248 textDecoration : "none" ,
252249 fontSize : "20px" ,
253250 fontWeight : 600 ,
254251} ) ) ;
255252
256- const MenuArrowButton = styled ( IconButton ) < { isMainPath ?: boolean } > ( ( { isMainPath = true } ) => ( {
257- color : isMainPath ? "white" : "rgba(18, 109, 127, 0.9)" ,
253+ const MenuArrowButton = styled ( IconButton ) < { isMainPath ?: boolean } > ( ( { theme , isMainPath = true } ) => ( {
254+ color : isMainPath ? theme . palette . mobileNavigation . main . text : theme . palette . mobileNavigation . sub . text ,
258255 padding : 8 ,
259256} ) ) ;
260257
261- const BackButton = styled ( Button ) < { isMainPath ?: boolean } > ( ( { isMainPath = true } ) => ( {
258+ const BackButton = styled ( Button ) < { isMainPath ?: boolean } > ( ( { theme , isMainPath = true } ) => ( {
262259 display : "flex" ,
263260 alignItems : "center" ,
264- color : isMainPath ? "white" : "rgba(18, 109, 127, 0.9)" ,
261+ color : isMainPath ? theme . palette . mobileNavigation . main . text : theme . palette . mobileNavigation . sub . text ,
265262 textTransform : "none" ,
266263 padding : "0 15px 0 0" ,
267264 minWidth : "auto" ,
268265 minHeight : "auto" ,
269266} ) ) ;
270267
271- const MenuChip = styled ( Chip ) < { isMainPath ?: boolean } > ( ( { isMainPath = true } ) => ( {
272- backgroundColor : isMainPath ? "rgba(212, 212, 212, 0.5)" : "rgba(18, 109, 127, 0.2)" ,
273- color : isMainPath ? "white" : "rgba(18, 109, 127, 0.9)" ,
268+ const MenuChip = styled ( Chip ) < { isMainPath ?: boolean } > ( ( { theme , isMainPath = true } ) => ( {
269+ backgroundColor : isMainPath ? theme . palette . mobileNavigation . main . chip . background : theme . palette . mobileNavigation . sub . chip . background ,
270+ color : isMainPath ? theme . palette . mobileNavigation . main . text : theme . palette . mobileNavigation . sub . text ,
274271 height : 40 ,
275272 borderRadius : 15 ,
276273 padding : "10px 13px" ,
@@ -282,7 +279,7 @@ const MenuChip = styled(Chip)<{ isMainPath?: boolean }>(({ isMainPath = true })
282279 } ,
283280
284281 "&:hover" : {
285- backgroundColor : isMainPath ? "rgba(212, 212, 212, 0.7)" : "rgba(18, 109, 127, 0.3)" ,
282+ backgroundColor : isMainPath ? theme . palette . mobileNavigation . main . chip . hover : theme . palette . mobileNavigation . sub . chip . hover ,
286283 } ,
287284} ) ) ;
288285
@@ -314,15 +311,15 @@ const Depth2Header = styled(Box)<{ isMainPath: boolean }>({
314311 marginBottom : 10 ,
315312} ) ;
316313
317- const Depth2Title = styled ( Typography ) < { isMainPath : boolean } > ( ( { isMainPath } ) => ( {
318- color : isMainPath ? "white" : "rgba(18, 109, 127, 0.9)" ,
314+ const Depth2Title = styled ( Typography ) < { isMainPath : boolean } > ( ( { theme , isMainPath } ) => ( {
315+ color : isMainPath ? theme . palette . mobileNavigation . main . text : theme . palette . mobileNavigation . sub . text ,
319316 fontSize : 20 ,
320317 fontWeight : 800 ,
321318} ) ) ;
322319
323- const Depth2Divider = styled ( Box ) < { isMainPath : boolean } > ( ( { isMainPath } ) => ( {
320+ const Depth2Divider = styled ( Box ) < { isMainPath : boolean } > ( ( { theme , isMainPath } ) => ( {
324321 height : 1 ,
325- backgroundColor : isMainPath ? "rgba(255, 255, 255, 0.3)" : "rgba(18, 109, 127, 0.3)" ,
322+ backgroundColor : isMainPath ? theme . palette . mobileNavigation . main . divider : theme . palette . mobileNavigation . sub . divider ,
326323 marginBottom : 21 ,
327324} ) ) ;
328325
0 commit comments