make tabs horizontally scroll if <1500px
This commit is contained in:
parent
af418573e3
commit
987700bbf4
5 changed files with 12 additions and 2 deletions
|
|
@ -21,6 +21,7 @@
|
|||
max-width: unset !important;
|
||||
flex-grow: unset !important;
|
||||
flex-basis: unset !important;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.page-scrollbar-content > div:first-child {
|
||||
|
|
|
|||
3
grafana-plugin/src/navbar/LegacyNavTabsBar.module.scss
Normal file
3
grafana-plugin/src/navbar/LegacyNavTabsBar.module.scss
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.root {
|
||||
min-width: 1500px;
|
||||
}
|
||||
|
|
@ -2,10 +2,15 @@ import React from 'react';
|
|||
|
||||
import { IconName } from '@grafana/data';
|
||||
import { Tab, TabsBar } from '@grafana/ui';
|
||||
import cn from 'classnames/bind';
|
||||
|
||||
import { pages } from 'pages';
|
||||
import { useStore } from 'state/useStore';
|
||||
|
||||
import styles from './LegacyNavTabsBar.module.scss';
|
||||
|
||||
const cx = cn.bind(styles);
|
||||
|
||||
export default function LegacyNavTabsBar({ currentPage }: { currentPage: string }): JSX.Element {
|
||||
const store = useStore();
|
||||
|
||||
|
|
@ -14,7 +19,7 @@ export default function LegacyNavTabsBar({ currentPage }: { currentPage: string
|
|||
.filter((page) => (page.hideFromTabsFn ? !page.hideFromTabsFn(store) : !page.hideFromTabs));
|
||||
|
||||
return (
|
||||
<TabsBar>
|
||||
<TabsBar className={cx('root')}>
|
||||
{navigationPages.map((page, index) => (
|
||||
<Tab
|
||||
key={index}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ export const pages: { [id: string]: PageDefinition } = [
|
|||
{
|
||||
icon: 'cog',
|
||||
id: 'settings',
|
||||
text: 'Organization Settings',
|
||||
text: 'Settings',
|
||||
hideFromBreadcrumbs: true,
|
||||
path: getPath('settings'),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
"name": "Alert Groups",
|
||||
"path": "/a/grafana-oncall-app/?page=incidents",
|
||||
"role": "Viewer",
|
||||
"defaultNav": true,
|
||||
"addToNav": true
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue