From 6513bbfaf2d2ddefdc5059ad0d7fd565b275f891 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 4 Aug 2021 16:31:41 +0100 Subject: [PATCH] TimeRangePicker: fix DOM nesting (#37550) (#37554) (cherry picked from commit 1a46123dbfb5627ca09a2f5f868f863dfb6cf8f1) Co-authored-by: Alex Khomenko --- .../components/DateTimePickers/TimeRangeInput.tsx | 1 + .../TimeRangePicker/TimePickerContent.tsx | 8 ++++---- .../TimeRangePicker/TimeRangeForm.tsx | 4 ++-- .../TimeRangePicker/TimeRangeList.tsx | 14 ++++++-------- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/grafana-ui/src/components/DateTimePickers/TimeRangeInput.tsx b/packages/grafana-ui/src/components/DateTimePickers/TimeRangeInput.tsx index e8bf4feac32..f9a84698b66 100644 --- a/packages/grafana-ui/src/components/DateTimePickers/TimeRangeInput.tsx +++ b/packages/grafana-ui/src/components/DateTimePickers/TimeRangeInput.tsx @@ -141,6 +141,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme2, disabled = false) => { inputStyles.suffix, css` position: relative; + top: -1px; margin-left: ${theme.v1.spacing.xs}; ` ), diff --git a/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimePickerContent.tsx b/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimePickerContent.tsx index 7f41ea675a9..a0ef3870f45 100644 --- a/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimePickerContent.tsx +++ b/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimePickerContent.tsx @@ -232,7 +232,7 @@ const NarrowScreenForm: React.FC = (props) => { return (
-

+
-

+ {!collapsed && (
@@ -278,9 +278,9 @@ const FullScreenForm: React.FC = (props) => { return ( <>
-

+
Absolute time range -

+
= (props) => { const icon = isFullscreen ? null :