From a7389906758f4c7fdb7af7c0d5b261b8b8e60cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Andr=C3=A9=20Lelis?= Date: Tue, 10 Mar 2020 19:26:45 -0300 Subject: [PATCH] feat: Study List Header (#1498) * Initial code for header * Basic implementation for the header * Updating icons * Fix conflicts after latest changes on base branch * Smnall refactor on header * Small text-size change * Remove comment * Remove link from OHIF logo * Fix cog/settings icon --- platform/ui/src/assets/icons/settings.svg | 2 +- .../src/views/StudyList/components/Header.js | 48 ++++++++++++++++--- .../views/StudyList/components/OHIFLogo.js | 7 +++ 3 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 platform/ui/src/views/StudyList/components/OHIFLogo.js diff --git a/platform/ui/src/assets/icons/settings.svg b/platform/ui/src/assets/icons/settings.svg index 6770652e6..a59f13eeb 100644 --- a/platform/ui/src/assets/icons/settings.svg +++ b/platform/ui/src/assets/icons/settings.svg @@ -1,4 +1,4 @@ - + diff --git a/platform/ui/src/views/StudyList/components/Header.js b/platform/ui/src/views/StudyList/components/Header.js index 6b553bada..d684df216 100644 --- a/platform/ui/src/views/StudyList/components/Header.js +++ b/platform/ui/src/views/StudyList/components/Header.js @@ -1,10 +1,46 @@ import React from 'react'; +import PropTypes from 'prop-types'; +import { withTranslation } from 'react-i18next'; -/** - * THIS FILE LOCATION IS TEMPORARY AND SHOULD NOT BE PLACED HERE - */ -const Header = () => { - return
{`<- HEADER CONTENT ->`}
; +import { IconButton, Icon } from '@ohif/ui'; + +import OHIFLogo from './OHIFLogo.js'; + +function Header({ appLogo = OHIFLogo(), children, t }) { + const showSettingsDropdown = () => { + // TODO: Update once dropdown component is created + }; + + return ( +
+
+
{appLogo}
+
{children}
+
+
+ + {t('FOR INVESTIGATIONAL USE ONLY')} + + + + + + + +
+
+ ); +} + +Header.propTypes = { + appLogo: PropTypes.node, + children: PropTypes.node, + t: PropTypes.func.isRequired, }; -export default Header; +export default withTranslation(['Header'])(Header); diff --git a/platform/ui/src/views/StudyList/components/OHIFLogo.js b/platform/ui/src/views/StudyList/components/OHIFLogo.js new file mode 100644 index 000000000..cb7105e2f --- /dev/null +++ b/platform/ui/src/views/StudyList/components/OHIFLogo.js @@ -0,0 +1,7 @@ +import React from 'react'; + +function OHIFLogo() { + return ICON - Open Health Imaging Foundation; +} + +export default OHIFLogo;