From 917e748fc56dea430da0c477f2a2fa1bf25bd70d Mon Sep 17 00:00:00 2001 From: uzairr Date: Sat, 6 Feb 2021 17:51:17 +0500 Subject: [PATCH] fix: align logo to left on authn mfe --- .gitignore | 1 + src/DesktopHeader.jsx | 4 +++- src/MobileHeader.jsx | 21 ++++++++++++--------- src/__snapshots__/Header.test.jsx.snap | 4 ++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 372d4f6..fe91cca 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ node_modules temp src/i18n/transifex_input.json module.config.js +.idea/ diff --git a/src/DesktopHeader.jsx b/src/DesktopHeader.jsx index d75f5df..e583831 100644 --- a/src/DesktopHeader.jsx +++ b/src/DesktopHeader.jsx @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { getConfig } from '@edx/frontend-platform'; // Local Components import { Menu, MenuTrigger, MenuContent } from './Menu'; @@ -103,10 +104,11 @@ class DesktopHeader extends React.Component { intl, } = this.props; const logoProps = { src: logo, alt: logoAltText, href: logoDestination }; + const logoClasses = getConfig().AUTHN_MINIMAL_HEADER ? 'mw-100' : null; return (
-
+
{logoDestination === null ? : }
); } diff --git a/src/__snapshots__/Header.test.jsx.snap b/src/__snapshots__/Header.test.jsx.snap index e8f79e0..9c47d0b 100644 --- a/src/__snapshots__/Header.test.jsx.snap +++ b/src/__snapshots__/Header.test.jsx.snap @@ -5,7 +5,7 @@ exports[`
renders correctly for anonymous desktop 1`] = ` className="site-header-desktop" >
renders correctly for authenticated desktop 1`] = ` className="site-header-desktop" >