mirror of
https://github.com/Permissionless-Software-Foundation/bch-dex-taker-v2.git
synced 2026-09-21 16:52:01 -07:00
Small UX improvement to the navigation menu
This commit is contained in:
@@ -18,3 +18,11 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-link-active {
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link-inactive {
|
||||||
|
color: gray !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { Nav, Navbar, Image } from 'react-bootstrap'
|
|||||||
import Logo from './psf-logo.png'
|
import Logo from './psf-logo.png'
|
||||||
|
|
||||||
function NavMenu (props) {
|
function NavMenu (props) {
|
||||||
|
const selectedMenu = props.appData.menuState
|
||||||
const handleClickEvent = (menuItem) => {
|
const handleClickEvent = (menuItem) => {
|
||||||
// Pass the selected menu item up to the parent component.
|
// Pass the selected menu item up to the parent component.
|
||||||
props.appData.setMenuState(menuItem)
|
props.appData.setMenuState(menuItem)
|
||||||
@@ -27,9 +28,27 @@ function NavMenu (props) {
|
|||||||
<Navbar.Toggle aria-controls='responsive-navbar-nav' />
|
<Navbar.Toggle aria-controls='responsive-navbar-nav' />
|
||||||
<Navbar.Collapse id='responsive-navbar-nav'>
|
<Navbar.Collapse id='responsive-navbar-nav'>
|
||||||
<Nav className='mr-auto'>
|
<Nav className='mr-auto'>
|
||||||
<Nav.Link href='#' onClick={(e) => handleClickEvent(0)}>Check Balance</Nav.Link>
|
<Nav.Link
|
||||||
<Nav.Link href='#' onClick={(e) => handleClickEvent(1)}>Placeholder2</Nav.Link>
|
className={selectedMenu === 0 ? 'nav-link-active' : 'nav-link-inactive'}
|
||||||
<Nav.Link href='#' onClick={(e) => handleClickEvent(2)}>Placeholder 3</Nav.Link>
|
href='#'
|
||||||
|
onClick={(e) => handleClickEvent(0)}
|
||||||
|
>
|
||||||
|
Check Balance
|
||||||
|
</Nav.Link>
|
||||||
|
<Nav.Link
|
||||||
|
className={selectedMenu === 1 ? 'nav-link-active' : 'nav-link-inactive'}
|
||||||
|
href='#'
|
||||||
|
onClick={(e) => handleClickEvent(1)}
|
||||||
|
>
|
||||||
|
Placeholder2
|
||||||
|
</Nav.Link>
|
||||||
|
<Nav.Link
|
||||||
|
className={selectedMenu === 2 ? 'nav-link-active' : 'nav-link-inactive'}
|
||||||
|
href='#'
|
||||||
|
onClick={(e) => handleClickEvent(2)}
|
||||||
|
>
|
||||||
|
Placeholder 3
|
||||||
|
</Nav.Link>
|
||||||
</Nav>
|
</Nav>
|
||||||
</Navbar.Collapse>
|
</Navbar.Collapse>
|
||||||
</Navbar>
|
</Navbar>
|
||||||
|
|||||||
Reference in New Issue
Block a user