From 7941c7a37be70699c99828a4a4acacf7da08a1d4 Mon Sep 17 00:00:00 2001 From: Munyua123 Date: Mon, 28 Oct 2024 16:52:23 +0300 Subject: [PATCH] O3-4026 Add an icon for vitals and biometrics on the left nav --- .../src/dashboards/DashboardExtension.tsx | 9 ++++++++- .../src/dashboards/dashboardextension.scss | 8 ++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/esm-patient-common-lib/src/dashboards/DashboardExtension.tsx b/packages/esm-patient-common-lib/src/dashboards/DashboardExtension.tsx index e91d2bdfe7..642a31b394 100644 --- a/packages/esm-patient-common-lib/src/dashboards/DashboardExtension.tsx +++ b/packages/esm-patient-common-lib/src/dashboards/DashboardExtension.tsx @@ -4,6 +4,8 @@ import last from 'lodash-es/last'; import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import { ConfigurableLink } from '@openmrs/esm-framework'; +import { ActivityIcon } from '@openmrs/esm-framework'; +import styling from './dashboardextension.scss'; export interface DashboardExtensionProps { path: string; @@ -22,13 +24,18 @@ export const DashboardExtension = ({ const location = useLocation(); const navLink = useMemo(() => decodeURIComponent(last(location.pathname.split('/'))), [location.pathname]); + const renderIcon = title === 'Vitals & Biometrics' ? : null; + return (
- {t(title)} + + {renderIcon} + {t(title)} +
); diff --git a/packages/esm-patient-common-lib/src/dashboards/dashboardextension.scss b/packages/esm-patient-common-lib/src/dashboards/dashboardextension.scss index e69de29bb2..e601c417ed 100644 --- a/packages/esm-patient-common-lib/src/dashboards/dashboardextension.scss +++ b/packages/esm-patient-common-lib/src/dashboards/dashboardextension.scss @@ -0,0 +1,8 @@ +.menu { + display: flex; + align-items: center; +} + +.icons { + margin-right: 0.5rem; +}