Hi i'm trying to map Bottom Navigation & change selected color change for component using MUI react. I have mapped as per below answer. I changed background color struck with the selected color change for navigation. Below is my code.what is missing ? Thanks
import React from 'react';
import Box from '@mui/material/Box';
import BottomNavigation from '@mui/material/BottomNavigation';
import BottomNavigationAction from '@mui/material/BottomNavigationAction';
import RestoreIcon from '@mui/icons-material/Restore';
import FavoriteIcon from '@mui/icons-material/Favorite';
import LocationOnIcon from '@mui/icons-material/LocationOn';
export const SimpleBottomNavigation = ({ navicons, }) => {
const [value, setValue] = React.useState(0);
return (
<Box sx={{ width: 500, }}>
<BottomNavigation
showLabels
value={value}
onChange={(event, newValue) => {
setValue(newValue);
}}
>
{navicons.map((item) => (
<BottomNavigationAction icon={item.icon} label={item.label} />
))}
</BottomNavigation>
</Box>
</ThemeProvider>
);
}
export const LabelBottomNavigation = LabelBottomNavigations.bind({});
MuiBottomNavigation: {
styleOverrides: {
root: {
backgroundColor: "#cccccc",
},
},
},
MuiBottomNavigationAction: {
styleOverrides: {
root: {
color: "red;",
},
},
},
$Muiselected: {
styleOverrides: {
root: {
color: "#ffffff;",
},
},
},