mirror of https://github.com/grafana/grafana.git
tweak layout
This commit is contained in:
parent
a8ea72012b
commit
ed6bf8811e
|
@ -101,21 +101,28 @@ const getStyles = (theme: GrafanaTheme2) => {
|
|||
position: 'relative',
|
||||
}),
|
||||
pageContent: css({
|
||||
backgroundColor: theme.colors.background.primary,
|
||||
border: `1px solid ${theme.colors.border.weak}`,
|
||||
borderRadius: theme.shape.radius.default,
|
||||
label: 'page-content',
|
||||
flexGrow: 1,
|
||||
padding: theme.spacing(1),
|
||||
|
||||
[theme.breakpoints.up('md')]: {
|
||||
padding: theme.spacing(2),
|
||||
},
|
||||
}),
|
||||
primaryBg: css({
|
||||
background: theme.colors.background.primary,
|
||||
}),
|
||||
pageInner: css({
|
||||
label: 'page-inner',
|
||||
padding: theme.spacing(2),
|
||||
borderBottom: 'none',
|
||||
background: theme.colors.background.primary,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
flexGrow: 1,
|
||||
margin: theme.spacing(0, 0, 0, 0),
|
||||
padding: theme.spacing(2),
|
||||
|
||||
[theme.breakpoints.up('md')]: {
|
||||
padding: theme.spacing(4),
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
import { css } from '@emotion/css';
|
||||
|
||||
import { NavModelItem, GrafanaTheme2 } from '@grafana/data';
|
||||
import { useStyles2, TabsBar, Tab, toIconName } from '@grafana/ui';
|
||||
import { NavModelItem } from '@grafana/data';
|
||||
import { TabsBar, Tab, toIconName } from '@grafana/ui';
|
||||
|
||||
export interface Props {
|
||||
navItem: NavModelItem;
|
||||
}
|
||||
|
||||
export function PageTabs({ navItem }: Props) {
|
||||
const styles = useStyles2(getStyles);
|
||||
|
||||
return (
|
||||
<div className={styles.tabsWrapper}>
|
||||
<TabsBar>
|
||||
<TabsBar hideBorder>
|
||||
{navItem.children!.map((child, index) => {
|
||||
const icon = child.icon ? toIconName(child.icon) : undefined;
|
||||
return (
|
||||
|
@ -31,14 +26,5 @@ export function PageTabs({ navItem }: Props) {
|
|||
);
|
||||
})}
|
||||
</TabsBar>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const getStyles = (theme: GrafanaTheme2) => {
|
||||
return {
|
||||
tabsWrapper: css({
|
||||
paddingBottom: theme.spacing(3),
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
|
|
@ -113,8 +113,6 @@ function getStyles(theme: GrafanaTheme2, variant: LibraryPanelsSearchVariant) {
|
|||
}),
|
||||
container: css({
|
||||
width: '100%',
|
||||
overflowY: 'auto',
|
||||
padding: theme.spacing(1),
|
||||
}),
|
||||
libraryPanelsView: css({
|
||||
width: '100%',
|
||||
|
|
Loading…
Reference in New Issue