From fadf01d60e73e6698209906b68c49c648e5ff255 Mon Sep 17 00:00:00 2001 From: Joseph John Aas Cooper <33054985+cooper-joe@users.noreply.github.com> Date: Mon, 4 Nov 2024 09:49:24 +0100 Subject: [PATCH] fix: info popover css style progress --- .../DataDimension/Info/InfoPopover.js | 2 + .../Info/styles/InfoPopover.style.js | 25 ++++- .../DataDimension/TransferOption.js | 4 +- .../styles/TransferOption.style.js | 94 +++++++++++-------- src/modules/dimensionSelectorHelper.js | 4 +- 5 files changed, 83 insertions(+), 46 deletions(-) diff --git a/src/components/DataDimension/Info/InfoPopover.js b/src/components/DataDimension/Info/InfoPopover.js index b4a2ed046..d521662f5 100644 --- a/src/components/DataDimension/Info/InfoPopover.js +++ b/src/components/DataDimension/Info/InfoPopover.js @@ -37,6 +37,8 @@ export const InfoPopover = ({ reference, onClose, ...props }) => { reference={reference} onClickOutside={onClose} maxWidth={480} + arrow={false} + elevation="rgba(0, 0, 0, 0.1) 0px 1px 5px, rgba(0, 0, 0, 0.07) 0px 3.6px 13px, rgba(0, 0, 0, 0.06) 0px 8.4px 23px, rgba(0, 0, 0, 0.05) 0px 23px 35px" >
{type === DIMENSION_TYPE_DATA_ELEMENT && ( diff --git a/src/components/DataDimension/Info/styles/InfoPopover.style.js b/src/components/DataDimension/Info/styles/InfoPopover.style.js index 2736689b1..be8e1c54f 100644 --- a/src/components/DataDimension/Info/styles/InfoPopover.style.js +++ b/src/components/DataDimension/Info/styles/InfoPopover.style.js @@ -1,25 +1,40 @@ -//import { colors, spacers } from '@dhis2/ui' +import { colors, spacers } from '@dhis2/ui' import css from 'styled-jsx/css' export default css` .popover { width: 480px; height: 360px; + border: 1px solid ${colors.grey400}; + overflow-x: hidden; + overflow-y: auto; } .loader { height: 100%; width: 100%; } .data-table { - display: block; - overflow: scroll; - max-height: 360px; - font-size: 14px; + display: table; + width: 100%; + border-collapse: collapse; + font-size: 13px; + margin: ${spacers.dp4} 0 0 0; + color: ${colors.grey900}; } .data-table th { text-align: left; + font-weight: 500; + padding: 6px 0 0 12px; + width: 128px; + vertical-align: baseline; + } + .data-table td { + padding: 6px 4px 6px 8px; } .data-table .code { font-family: monospace; } + .data-table tr:hover { + background: ${colors.grey100}; + } ` diff --git a/src/components/DataDimension/TransferOption.js b/src/components/DataDimension/TransferOption.js index 58ca48209..c29967dda 100644 --- a/src/components/DataDimension/TransferOption.js +++ b/src/components/DataDimension/TransferOption.js @@ -44,7 +44,7 @@ export const TransferOption = ({ onDoubleClick({ label, value }, event) }} > -
+
{icon} {label} {onEditClick && ( @@ -60,7 +60,7 @@ export const TransferOption = ({ )}
-
+
{dimensionType}