From fa7bc446e51595e876308ee503b08aee7505675d Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Mon, 22 May 2023 15:04:10 -0700 Subject: [PATCH] [EuiDatePickerRange] Use `span` wrapper to match EuiDatePicker - helps separate form control and date picker range concerns --- .../date_picker_range.test.tsx.snap | 484 +++++++++--------- .../date_picker/date_picker_range.tsx | 27 +- 2 files changed, 265 insertions(+), 246 deletions(-) diff --git a/src/components/date_picker/__snapshots__/date_picker_range.test.tsx.snap b/src/components/date_picker/__snapshots__/date_picker_range.test.tsx.snap index cf045fc2e2e..6c42fd60a5d 100644 --- a/src/components/date_picker/__snapshots__/date_picker_range.test.tsx.snap +++ b/src/components/date_picker/__snapshots__/date_picker_range.test.tsx.snap @@ -1,362 +1,382 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`EuiDatePickerRange disabled is rendered 1`] = ` -
- -
-
+ class="euiFormControlLayoutCustomIcon" + > + +
- +
+ +
-
-
- - to - -
-
+ + to + +
- +
+ +
- + `; exports[`EuiDatePickerRange is rendered 1`] = ` -
- -
-
+ class="euiFormControlLayoutCustomIcon" + > + +
- +
+ +
-
-
- - to - -
-
+ + to + +
- +
+ +
- + `; exports[`EuiDatePickerRange isInvalid is rendered 1`] = ` -
- -
-
+ class="euiFormControlLayoutCustomIcon" + > + +
- +
+ +
-
-
- - to - -
-
+ + to + +
- +
+ +
-
-
- +
+ +
- + `; exports[`EuiDatePickerRange readOnly is rendered 1`] = ` -
- -
-
+ class="euiFormControlLayoutCustomIcon" + > + +
- +
+ +
-
-
- - to - -
-
+ + to + +
- +
+ +
- + `; exports[`EuiDatePickerRange uses individual EuiDatePicker props 1`] = ` -
- -
-
+ class="euiFormControlLayoutCustomIcon" + > + +
- +
+ +
-
-
- - to - -
-
+ + to + +
- +
+ +
- + `; diff --git a/src/components/date_picker/date_picker_range.tsx b/src/components/date_picker/date_picker_range.tsx index db554e6c9b9..d6adfb79be7 100644 --- a/src/components/date_picker/date_picker_range.tsx +++ b/src/components/date_picker/date_picker_range.tsx @@ -152,19 +152,18 @@ export const EuiDatePickerRange: FunctionComponent = ({ } return ( - + + + ); };