Skip to content

Commit

Permalink
[Navigation bar] Improve nav button visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
rikurauhala committed Dec 11, 2024
1 parent 9371c7d commit 634c4c9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
19 changes: 17 additions & 2 deletions services/frontend/src/components/material/NavigationBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,29 @@ export const NavigationBar = () => {
>
<OodikoneLogo />
{!isLoading && location && (
<Tabs textColor="inherit" value={activeTab} variant="scrollable">
<Tabs
sx={{
'& .MuiTabs-indicator': {
backgroundColor: theme => theme.palette.activeNavigationTab,
},
}}
textColor="inherit"
value={activeTab}
variant="scrollable"
>
{Object.entries(visibleNavigationItems).map(([key, item]) => (
<Tab
component={item.path ? Link : 'div'}
data-cy={`nav-bar-button-${key}`}
key={key}
label={<NavigationButton item={item} />}
sx={{ '&:hover': { color: 'inherit' } }}
sx={{
opacity: 1,
'&:hover': {
color: 'inherit',
opacity: 0.7,
},
}}
to={item.path ?? ''}
/>
))}
Expand Down
3 changes: 3 additions & 0 deletions services/frontend/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createTheme } from '@mui/material/styles'

declare module '@mui/material/styles' {
interface Palette {
activeNavigationTab: string
export: string
graduationTimes: {
onTime: string
Expand All @@ -11,6 +12,7 @@ declare module '@mui/material/styles' {
}
}
interface PaletteOptions {
activeNavigationTab: string
export: string
graduationTimes?: {
onTime: string
Expand All @@ -22,6 +24,7 @@ declare module '@mui/material/styles' {

export const theme = createTheme({
palette: {
activeNavigationTab: '#fff',
export: deepPurple[500],
graduationTimes: {
onTime: '#90a959',
Expand Down

0 comments on commit 634c4c9

Please sign in to comment.