UNPKG

@grafana/ui

Version:
27 lines (24 loc) 989 B
import { jsxs, jsx } from 'react/jsx-runtime'; import { selectors } from '@grafana/e2e-selectors'; import { Trans, t } from '@grafana/i18n'; import { IconButton } from '../../IconButton/IconButton.mjs'; import { Stack } from '../../Layout/Stack/Stack.mjs'; import { TimePickerTitle } from './TimePickerTitle.mjs'; function Header({ onClose }) { return /* @__PURE__ */ jsxs(Stack, { justifyContent: "space-between", children: [ /* @__PURE__ */ jsx(TimePickerTitle, { children: /* @__PURE__ */ jsx(Trans, { i18nKey: "time-picker.calendar.select-time", children: "Select a time range" }) }), /* @__PURE__ */ jsx( IconButton, { "data-testid": selectors.components.TimePicker.calendar.closeButton, tooltip: t(`time-picker.calendar.close`, "Close calendar"), name: "times", variant: "secondary", onClick: onClose } ) ] }); } Header.displayName = "Header"; export { Header }; //# sourceMappingURL=CalendarHeader.mjs.map