From 37c14c10b9760ee5df394844021e8b71d0e680c8 Mon Sep 17 00:00:00 2001
From: AndyEPhipps
Date: Mon, 2 Dec 2024 16:40:30 +0000
Subject: [PATCH] Reset to old nav
---
.../Header/Burger/BurgerMenu.style.js | 1 -
src/components/Organisms/Header/Header.js | 22 +-
src/components/Organisms/Header/Header.md | 281 +-----------------
.../Organisms/Header/Header.style.js | 65 +---
src/components/Organisms/Header/Nav/Nav.js | 183 ++++++++++++
.../Organisms/Header/Nav/Nav.style.js | 245 +++++++++++++++
.../Organisms/Header/Nav/chevron-down.svg | 3 +
src/components/Organisms/Header/data/data.js | 144 +++++----
8 files changed, 548 insertions(+), 396 deletions(-)
create mode 100644 src/components/Organisms/Header/Nav/Nav.js
create mode 100644 src/components/Organisms/Header/Nav/Nav.style.js
create mode 100644 src/components/Organisms/Header/Nav/chevron-down.svg
diff --git a/src/components/Organisms/Header/Burger/BurgerMenu.style.js b/src/components/Organisms/Header/Burger/BurgerMenu.style.js
index 81789fcaf..1b6de22e6 100644
--- a/src/components/Organisms/Header/Burger/BurgerMenu.style.js
+++ b/src/components/Organisms/Header/Burger/BurgerMenu.style.js
@@ -50,7 +50,6 @@ const BurgerWrapper = styled(Link)`
::after {
width: 25px;
height: 3px;
- border-radius: 3px;
display: inline-block;
}
diff --git a/src/components/Organisms/Header/Header.js b/src/components/Organisms/Header/Header.js
index efdc76ffa..c1d0253d9 100644
--- a/src/components/Organisms/Header/Header.js
+++ b/src/components/Organisms/Header/Header.js
@@ -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
}) => (
-
+
-
-
- {metaIcons}
- {donateButton}
-
-
+
+ {metaIcons}
);
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
};
diff --git a/src/components/Organisms/Header/Header.md b/src/components/Organisms/Header/Header.md
index a5d4cbb88..0406b5971 100644
--- a/src/components/Organisms/Header/Header.md
+++ b/src/components/Organisms/Header/Header.md
@@ -7,9 +7,9 @@ import Link from '../../Atoms/Link/Link';
-
+
Donate
>
@@ -26,9 +26,9 @@ import Link from '../../Atoms/Link/Link';
-
+
Donate
>
@@ -45,9 +45,9 @@ import Link from '../../Atoms/Link/Link';
-
+
Donate
>
@@ -87,15 +87,12 @@ const [success, setSuccess] = React.useState(false);
-
+
Donate
- >
- }
- metaIcons={
- <>
+
>
@@ -114,7 +109,7 @@ const [success, setSuccess] = React.useState(false);
/>;
```
-# Comic Relief full header #1
+# Comic Relief header with Search and Shop
```js
import data from './data/data';
@@ -122,7 +117,6 @@ import Link from '../../Atoms/Link/Link';
import searchIcon from './assets/icon--search--2023.svg';
import shopIcon from './assets/icon--shop--2023.svg';
import payinIcon from './assets/PayIn.svg';
-import esuIcon from './assets/Post.svg';
import Icon from '../../Atoms/SocialIcons/Icon/Icon';
import RichText from '../../Atoms/RichText/RichText';
@@ -147,59 +141,14 @@ const successCopy = (
initialState = { isSuccess: false };
const [success, setSuccess] = React.useState(false);
-<>
-
+
Donate
- >
- }
- metaIcons={
- <>
-
-
-
-
-
-
-
-
-
-
-
- >
- }
-/>
-
-
-
->;
-```
-
-# Comic Relief full header #2
-
-```js
-import data from './data/data-extended';
-import Link from '../../Atoms/Link/Link';
-import searchIcon from './assets/icon--search--2023.svg';
-import shopIcon from './assets/icon--shop--2023.svg';
-import payinIcon from './assets/PayIn.svg';
-import esuIcon from './assets/Post.svg';
-
-import Icon from '../../Atoms/SocialIcons/Icon/Icon';
-import RichText from '../../Atoms/RichText/RichText';
-
-const title = 'Stay in the know!';
-const topCopy = (
- Get regular email updates and info on what we're up to!
`}
- />
-);
-const privacyCopy = (
- Our Privacy Policy describes how we handle and protect your information.
If you are under 18, please make sure you have your parents’ permission before providing us with any personal details.`}
- />
-);
-const successCopy = (
- Thanks! Your first email will be with you shortly`}
- />
-);
-
-initialState = { isSuccess: false };
-const [success, setSuccess] = React.useState(false);
-
-<>
-
-
- Donate
-
- >
- }
- metaIcons={
- <>
-
-
-
-
-
-
-
-
-
-
-
- >
- }
-/>
-
-
-
->;
-```
-
-# Comic Relief full header #3: nav items as per 19/11/24
-
-```js
-import data from './data/data-live';
-import Link from '../../Atoms/Link/Link';
-import searchIcon from './assets/icon--search--2023.svg';
-import shopIcon from './assets/icon--shop--2023.svg';
-import payinIcon from './assets/PayIn.svg';
-import esuIcon from './assets/Post.svg';
-
-import Icon from '../../Atoms/SocialIcons/Icon/Icon';
-import RichText from '../../Atoms/RichText/RichText';
-
-const title = 'Stay in the know!';
-const topCopy = (
- Get regular email updates and info on what we're up to!`}
- />
-);
-const privacyCopy = (
- Our Privacy Policy describes how we handle and protect your information.
If you are under 18, please make sure you have your parents’ permission before providing us with any personal details.`}
- />
-);
-const successCopy = (
- Thanks! Your first email will be with you shortly`}
- />
-);
-
-initialState = { isSuccess: false };
-const [success, setSuccess] = React.useState(false);
-
-<>
-
-
- Donate
-
- >
- }
- metaIcons={
- <>
-