From 93e07aeb9f9e6665f8105fe4213037bff0165767 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Fri, 15 Sep 2023 08:43:53 +0200 Subject: [PATCH] Revert "fix: force table cell content to wrap to prevent overly wide modal (DHIS2-5920) (#2961)" This reverts commit 87fe4cc451894cb464e1322f8a1f3f867b9df8b7. --- src/components/map/layers/EventPopup.js | 3 +-- .../map/layers/styles/EventPopup.module.css | 20 ------------------- src/components/map/styles/Popup.css | 8 ++++++-- 3 files changed, 7 insertions(+), 24 deletions(-) delete mode 100644 src/components/map/layers/styles/EventPopup.module.css diff --git a/src/components/map/layers/EventPopup.js b/src/components/map/layers/EventPopup.js index 1e48cf6d6..c74069b33 100644 --- a/src/components/map/layers/EventPopup.js +++ b/src/components/map/layers/EventPopup.js @@ -5,7 +5,6 @@ import React, { useEffect } from 'react' import { EVENT_ID_FIELD } from '../../../util/geojson.js' import { formatTime, formatCoordinate } from '../../../util/helpers.js' import Popup from '../Popup.js' -import classes from './styles/EventPopup.module.css' // Returns true if value is not undefined or null; const hasValue = (value) => value !== undefined || value !== null @@ -88,7 +87,7 @@ const EventPopup = ({ {error && {i18n.t('Could not retrieve event data')}} {!error && ( diff --git a/src/components/map/layers/styles/EventPopup.module.css b/src/components/map/layers/styles/EventPopup.module.css deleted file mode 100644 index 2b0976f80..000000000 --- a/src/components/map/layers/styles/EventPopup.module.css +++ /dev/null @@ -1,20 +0,0 @@ -.eventPopup { - max-height: 300px; - overflow: auto; - line-height: 14px; - max-width: 400px; -} - -.eventPopup th, .eventPopup td { - text-align: left; - vertical-align: top; -} - -.eventPopup tr th { - font-weight: 500; - padding-right: var(--spacers-dp4); -} - -.eventPopup tr td { - min-width: 120px; -} diff --git a/src/components/map/styles/Popup.css b/src/components/map/styles/Popup.css index d2e1ee13f..854912430 100644 --- a/src/components/map/styles/Popup.css +++ b/src/components/map/styles/Popup.css @@ -7,6 +7,10 @@ min-width: 150px; } -.maplibregl-popup-close-button:focus { - outline: none; +.dhis2-map-popup-event { + overflow-x: auto; +} + +.dhis2-map-popup-event th { + text-align: left; }