From d55c12c48e641874172503c3673ba128473ab557 Mon Sep 17 00:00:00 2001 From: Polina Boneva <13227501+polibb@users.noreply.github.com> Date: Fri, 29 Sep 2023 14:21:31 +0300 Subject: [PATCH] Dashboard: Smaller padding on Save dashboards sidebar when smaller screen (#75354) * content not scrollable * not able to scroll the whole drawer * reduce space inbetween drawer's title, subtitle, and tabs --- packages/grafana-ui/src/components/Drawer/Drawer.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/grafana-ui/src/components/Drawer/Drawer.tsx b/packages/grafana-ui/src/components/Drawer/Drawer.tsx index c31c80dc3f9..6161585074b 100644 --- a/packages/grafana-ui/src/components/Drawer/Drawer.tsx +++ b/packages/grafana-ui/src/components/Drawer/Drawer.tsx @@ -274,8 +274,9 @@ const getStyles = (theme: GrafanaTheme2) => { }, }), header: css({ + label: 'drawer-header', flexGrow: 0, - padding: theme.spacing(3, 2), + padding: theme.spacing(2, 2, 3), borderBottom: `1px solid ${theme.colors.border.weak}`, }), headerWithTabs: css({ @@ -284,12 +285,14 @@ const getStyles = (theme: GrafanaTheme2) => { actions: css({ position: 'absolute', right: theme.spacing(1), - top: theme.spacing(2), + top: theme.spacing(1), }), titleWrapper: css({ + label: 'drawer-title', overflowWrap: 'break-word', }), subtitle: css({ + label: 'drawer-subtitle', color: theme.colors.text.secondary, paddingTop: theme.spacing(1), }), @@ -299,12 +302,13 @@ const getStyles = (theme: GrafanaTheme2) => { flexGrow: 1, }), contentScroll: css({ - minHeight: 0, + label: 'drawer-content', flex: 1, }), tabsWrapper: css({ + label: 'drawer-tabs', paddingLeft: theme.spacing(2), - margin: theme.spacing(2, -1, -3, -3), + margin: theme.spacing(0, -1, -3, -3), }), }; };