tweak layout
CodeQL checks / Analyze (go) (push) Has been cancelled Details
CodeQL checks / Analyze (javascript) (push) Has been cancelled Details
CodeQL checks / Analyze (python) (push) Has been cancelled Details

This commit is contained in:
Ashley Harrison 2025-04-28 09:12:27 +01:00
parent a8ea72012b
commit ed6bf8811e
No known key found for this signature in database
GPG Key ID: FFB870B48A9457E0
3 changed files with 30 additions and 39 deletions

View File

@ -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),

View File

@ -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),
}),
};
};

View File

@ -113,8 +113,6 @@ function getStyles(theme: GrafanaTheme2, variant: LibraryPanelsSearchVariant) {
}),
container: css({
width: '100%',
overflowY: 'auto',
padding: theme.spacing(1),
}),
libraryPanelsView: css({
width: '100%',