-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SHARED:VKT(Frontend): MobileNavigationMenu improvements, add opaque o…
…verlay on main contents if menu is open [deploy]
- Loading branch information
Showing
13 changed files
with
180 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,6 @@ | |
}, | ||
"dependencies": { | ||
"reduxjs-toolkit-persist": "^7.2.1", | ||
"shared": "npm:@opetushallitus/[email protected].7" | ||
"shared": "npm:@opetushallitus/[email protected].8" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
frontend/packages/vkt/src/redux/reducers/mobileNavigationMenu.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
|
||
export interface MobileNavigationMenuState { | ||
open: boolean; | ||
} | ||
|
||
const initialState: MobileNavigationMenuState = { | ||
open: false, | ||
}; | ||
|
||
const mobileNavigationMenuSlice = createSlice({ | ||
name: 'mobileNavigationMenu', | ||
initialState, | ||
reducers: { | ||
setMobileNavigationMenuState(state, action: PayloadAction<boolean>) { | ||
state.open = action.payload; | ||
}, | ||
}, | ||
}); | ||
|
||
export const mobileNavigationMenuReducer = mobileNavigationMenuSlice.reducer; | ||
export const { setMobileNavigationMenuState } = | ||
mobileNavigationMenuSlice.actions; |
7 changes: 7 additions & 0 deletions
7
frontend/packages/vkt/src/redux/selectors/mobileNavigationMenu.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { RootState } from 'configs/redux'; | ||
import { MobileNavigationMenuState } from 'redux/reducers/mobileNavigationMenu'; | ||
|
||
export const mobileNavigationMenuSelector: ( | ||
state: RootState, | ||
) => MobileNavigationMenuState = (state: RootState) => | ||
state.mobileNavigationMenu; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.