mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add scrolling to SectionNav (#54698)
This commit is contained in:
parent
aee13563ce
commit
a423c7f22e
@ -2,7 +2,7 @@ import { css } from '@emotion/css';
|
||||
import React from 'react';
|
||||
|
||||
import { NavModel, GrafanaTheme2 } from '@grafana/data';
|
||||
import { useStyles2, Icon, VerticalTab, toIconName } from '@grafana/ui';
|
||||
import { useStyles2, Icon, VerticalTab, toIconName, CustomScrollbar } from '@grafana/ui';
|
||||
|
||||
export interface Props {
|
||||
model: NavModel;
|
||||
@ -23,6 +23,7 @@ export function SectionNav(props: Props) {
|
||||
{main.img && <img className={styles.sectionImg} src={main.img} alt={`logo of ${main.text}`} />}
|
||||
{props.model.main.text}
|
||||
</h2>
|
||||
<CustomScrollbar>
|
||||
<div className={styles.items} role="tablist">
|
||||
{directChildren.map((child, index) => {
|
||||
return (
|
||||
@ -51,6 +52,7 @@ export function SectionNav(props: Props) {
|
||||
</>
|
||||
))}
|
||||
</div>
|
||||
</CustomScrollbar>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user