Change icon on active menu item (#903)
* add icons * add logic to change the icon * make the active menu bold * Encapsulate the dynamic icon behaviour into a self-contained component Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
+11
-2
@@ -1,7 +1,16 @@
|
||||
import MusicNoteIcon from '@material-ui/icons/MusicNote'
|
||||
import React from 'react'
|
||||
import SongList from './SongList'
|
||||
import MusicNoteOutlinedIcon from '@material-ui/icons/MusicNoteOutlined'
|
||||
import MusicNoteIcon from '@material-ui/icons/MusicNote'
|
||||
import DynamicMenuIcon from '../layout/DynamicMenuIcon'
|
||||
|
||||
export default {
|
||||
list: SongList,
|
||||
icon: MusicNoteIcon,
|
||||
icon: (
|
||||
<DynamicMenuIcon
|
||||
path={'song'}
|
||||
icon={MusicNoteOutlinedIcon}
|
||||
activeIcon={MusicNoteIcon}
|
||||
/>
|
||||
),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user