Skip to content

Commit

Permalink
Reset to old nav
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyEPhipps committed Dec 2, 2024
1 parent b5dd67a commit 37c14c1
Show file tree
Hide file tree
Showing 8 changed files with 548 additions and 396 deletions.
1 change: 0 additions & 1 deletion src/components/Organisms/Header/Burger/BurgerMenu.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const BurgerWrapper = styled(Link)`
::after {
width: 25px;
height: 3px;
border-radius: 3px;
display: inline-block;
}
Expand Down
22 changes: 8 additions & 14 deletions src/components/Organisms/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,30 @@ import React from 'react';
import PropTypes from 'prop-types';

import Logos from '../../Molecules/Logos/Logos';
import HeaderNav from './HeaderNav/HeaderNav';
import MainNav from './Nav/Nav';
import {
Brand, HeaderWrapper, InnerWrapper, DonateButtonWrapperTop, HeaderMetaIcons, ButtonsAndIcons
Brand, HeaderWrapper, InnerWrapper, MetaIcons
} from './Header.style';

const Header = ({
navItems = {}, metaIcons, campaign = 'Comic Relief', donateButton = null, ...rest
navItems = {}, metaIcons, campaign = 'Comic Relief', ...rest
}) => (
<HeaderWrapper navItems {...rest}>
<InnerWrapper>
<Brand>
<Logos campaign={campaign} sizeSm="100px" sizeMd="100px" />
<Logos campaign={campaign} />
</Brand>
<HeaderNav navItems={navItems} metaIcons={metaIcons} donateButton={donateButton} />
<ButtonsAndIcons>
<HeaderMetaIcons isHeader data-testid="meta-icons--desktop">{metaIcons}</HeaderMetaIcons>
<DonateButtonWrapperTop data-testid="donate-button--desktop">{donateButton}</DonateButtonWrapperTop>
</ButtonsAndIcons>

<MainNav navItems={navItems} />
<MetaIcons>{metaIcons}</MetaIcons>
</InnerWrapper>
</HeaderWrapper>
);

Header.propTypes = {
// Check data structure example in src/components/moleculecules/header/data/data
/** Check data structure example in file src/components/moleculecules/header/data/data */
navItems: PropTypes.objectOf(PropTypes.shape),
// NB: metaIcons no longer include the Donate button:
/** it can be icons, buttons */
metaIcons: PropTypes.node.isRequired,
// ... and is supplied separately to allow more render control:
donateButton: PropTypes.node,
campaign: PropTypes.string
};

Expand Down
Loading

0 comments on commit 37c14c1

Please sign in to comment.