From 5b0b9c9ecc11e3a6c130f6e780208159f23cdabe Mon Sep 17 00:00:00 2001 From: jackyin Date: Wed, 27 Nov 2024 20:50:44 +0800 Subject: [PATCH] ToolbarButton: Auto width on smaller screen sizes (#96023) * fix bug * optimise * delete annotation * optimise --- .../grafana-ui/src/components/ToolbarButton/ToolbarButton.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/grafana-ui/src/components/ToolbarButton/ToolbarButton.tsx b/packages/grafana-ui/src/components/ToolbarButton/ToolbarButton.tsx index 413d7b493a9..fa53277d9fe 100644 --- a/packages/grafana-ui/src/components/ToolbarButton/ToolbarButton.tsx +++ b/packages/grafana-ui/src/components/ToolbarButton/ToolbarButton.tsx @@ -159,6 +159,10 @@ const getStyles = (theme: GrafanaTheme2) => { }), }, + [theme.breakpoints.down('md')]: { + width: 'auto !important', + }, + '&:focus, &:focus-visible': { ...getFocusStyles(theme), zIndex: 1,