From deec06607974b97948c9fa1733a549dc7d336213 Mon Sep 17 00:00:00 2001 From: Dishebh Bhayana Date: Fri, 11 Dec 2020 22:37:28 +0530 Subject: [PATCH] changed to ul and fieldset tag --- .../quick_select_popover/recently_used.tsx | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/src/components/date_picker/super_date_picker/quick_select_popover/recently_used.tsx b/src/components/date_picker/super_date_picker/quick_select_popover/recently_used.tsx index 034f8f971da..8450b359c47 100644 --- a/src/components/date_picker/super_date_picker/quick_select_popover/recently_used.tsx +++ b/src/components/date_picker/super_date_picker/quick_select_popover/recently_used.tsx @@ -17,17 +17,20 @@ * under the License. */ -import React, { Fragment, FunctionComponent } from 'react'; +import React, { FunctionComponent } from 'react'; import { prettyDuration } from '../pretty_duration'; -import { EuiFlexGroup, EuiFlexItem } from '../../../flex'; +import { EuiI18n } from '../../../i18n'; +import { EuiFlexItem } from '../../../flex'; +import { htmlIdGenerator } from '../../../../services'; import { EuiTitle } from '../../../title'; import { EuiSpacer } from '../../../spacer'; import { EuiLink } from '../../../link'; -import { EuiText } from '../../../text'; import { EuiHorizontalRule } from '../../../horizontal_rule'; import { DurationRange, ApplyTime } from '../../types'; +const generateId = htmlIdGenerator(); + export interface EuiRecentlyUsedProps { applyTime: ApplyTime; commonlyUsedRanges: DurationRange[]; @@ -41,6 +44,8 @@ export const EuiRecentlyUsed: FunctionComponent = ({ dateFormat, recentlyUsedRanges = [], }) => { + const legendId = generateId(); + if (recentlyUsedRanges.length === 0) { return null; } @@ -50,7 +55,11 @@ export const EuiRecentlyUsed: FunctionComponent = ({ applyTime({ start, end }); }; return ( - + {prettyDuration(start, end, commonlyUsedRanges, dateFormat)} @@ -59,18 +68,21 @@ export const EuiRecentlyUsed: FunctionComponent = ({ }); return ( - +
- Recently used date ranges + + + - - - {links} - - +
+
    {links}
+
- +
); };