From 30b77e97163262385f19b2c2772b1013fbfddfc9 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Mon, 30 May 2022 01:58:02 -0400 Subject: [PATCH] PanelChrome: Fixes issue with padding not being applied as gridUnits (#49751) (#49780) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 7be5142164c8a9282cc7922b2ae3e534a2a8f426) Co-authored-by: Torkel Ödegaard --- packages/grafana-ui/src/components/PanelChrome/PanelChrome.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/PanelChrome/PanelChrome.tsx b/packages/grafana-ui/src/components/PanelChrome/PanelChrome.tsx index 1b759ac826f..02875a6c2ea 100644 --- a/packages/grafana-ui/src/components/PanelChrome/PanelChrome.tsx +++ b/packages/grafana-ui/src/components/PanelChrome/PanelChrome.tsx @@ -79,7 +79,7 @@ const getContentStyle = ( headerHeight: number, height: number ) => { - const chromePadding = padding === 'md' ? theme.components.panel.padding : 0; + const chromePadding = (padding === 'md' ? theme.components.panel.padding : 0) * theme.spacing.gridSize; const panelBorder = 1 * 2; const innerWidth = width - chromePadding * 2 - panelBorder; const innerHeight = height - headerHeight - chromePadding * 2 - panelBorder;