In Material-UI v4, I could do a StyledBadge in a BottomNavigationAction like this:
<BottomNavigationAction
id="0"
label="Appointments"
icon={(
<StyledBadge badgeContent={numberOfUnreadAPPTS.toString()} overlap="circular">
<ApptsIcon />
</StyledBadge>
)}
classes={{
root: classes.actionItemStyles,
selected: classes.selected
}}
disabled={!AppState.netWorkIsOnline}
/>
In MUI v5 I tried to do it like this:
<BottomNavigationAction label="Appointments" icon={
<StyledBadge badgeContent={numberOfUnreadAPPTS.toString()} >
<ApptsIcon />
</StyledBadge>
} />
...but it's not liking the use of StyledBadge for the icon:
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
What's the correct way to get a StyledBadge in BottomNavigationAction in MUI v5?