Theme: Expose Drawer padding as part of theme.components (#104273)

* expose drawer padding as part of theme.components

* add default
This commit is contained in:
Ashley Harrison
2025-04-22 15:01:41 +01:00
committed by GitHub
parent 12c8e54990
commit ba05a1e5d2
2 changed files with 7 additions and 1 deletions
@@ -36,6 +36,9 @@ export interface ThemeComponents {
background: string;
padding: number;
};
drawer: {
padding: number;
};
textHighlight: {
background: string;
text: string;
@@ -87,6 +90,9 @@ export function createComponents(colors: ThemeColors, shadows: ThemeShadows): Th
background: colors.background.canvas,
padding: 1,
},
drawer: {
padding: 2,
},
overlay: {
background: colors.mode === 'dark' ? 'rgba(63, 62, 62, 0.5)' : 'rgba(208, 209, 211, 0.5)',
},
@@ -334,7 +334,7 @@ const getStyles = (theme: GrafanaTheme2) => {
paddingTop: theme.spacing(1),
}),
content: css({
padding: theme.spacing(2),
padding: theme.spacing(theme.components.drawer?.padding ?? 2),
height: '100%',
flexGrow: 1,
minHeight: 0,