import ListItemText from '@material-ui/core/ListItemText';\r
\r
import { withStyles, WithStyles, createStyles, Theme } from '@material-ui/core/styles';\r
+import { toAriaLabel } from '../../utilities/yangHelper';\r
\r
const styles = (theme: Theme) => createStyles({\r
active: {\r
props.external ? <a target="_blank" href={to} { ...itemProps }></a> :\r
<NavLink exact={ exact } to={ to } activeClassName={ classes.active } { ...itemProps } />);\r
\r
- const ariaLabel = typeof Primary === 'string' ? "link-to-"+Primary.toLowerCase().replace(/\s/g, "-") : "link-to-"+Primary.displayName?.toLowerCase();\r
+ const ariaLabel = typeof Primary === 'string' ? toAriaLabel("link-to-"+Primary) : toAriaLabel("link-to-"+Primary.displayName);\r
return (\r
<>\r
<ListItem button component={ renderLink } aria-label={ariaLabel}>\r