BottomNavLinks: Accessible text for image and icon (#36650)

This commit is contained in:
Tobias Skarhed 2021-07-12 16:15:40 +02:00 committed by GitHub
parent 3c1a9a9eae
commit 5e62bddd1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -7,7 +7,6 @@ import { Icon } from './Icon';
Grafana's wrapper component over [Font Awesome](https://fontawesome.com/) and Unicons icons
### Changing icon size
By default `Icon` has width and height of `16px` and font-size of `14px`. Pass `className` to control icon's size:
@ -15,8 +14,7 @@ By default `Icon` has width and height of `16px` and font-size of `14px`. Pass `
```jsx
import { css } from 'emotion';
<Icon name="check" />
<Icon name="check" />;
```
<Props of={Icon} />

View File

@ -50,8 +50,8 @@ export default class BottomNavLinks extends PureComponent<Props, State> {
<div className="sidemenu-item dropdown dropup">
<Link href={link.url} className="sidemenu-link" target={link.target}>
<span className="icon-circle sidemenu-icon">
{link.icon && <Icon name={link.icon as IconName} size="xl" />}
{link.img && <img src={link.img} />}
{link.icon && <Icon name={link.icon as IconName} size="xl" title="Help icon" />}
{link.img && <img src={link.img} alt="Profile picture" />}
</span>
</Link>
<ul className="dropdown-menu dropdown-menu--sidemenu" role="menu">