@comicrelief/component-library 6.7.0 → 6.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -123,7 +123,10 @@ var MainNav = function MainNav(_ref) {
123
123
  } : null,
124
124
  onKeyUp: keyPressed(group.title),
125
125
  role: "button"
126
- }, thisFirstChild.title) : /*#__PURE__*/_react.default.createElement(_Text.default, null, /*#__PURE__*/_react.default.createElement(_Nav.NavLink, {
126
+ }, thisFirstChild.title, hasSubMenu && /*#__PURE__*/_react.default.createElement(_Nav.ChevronWrapper, null, /*#__PURE__*/_react.default.createElement("img", {
127
+ src: _chevronDown.default,
128
+ alt: "chevron down icon"
129
+ }))) : /*#__PURE__*/_react.default.createElement(_Text.default, null, /*#__PURE__*/_react.default.createElement(_Nav.NavLink, {
127
130
  href: thisUrl,
128
131
  inline: true,
129
132
  rel: relNoopener,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comicrelief/component-library",
3
3
  "author": "Comic Relief Engineering Team",
4
- "version": "6.7.0",
4
+ "version": "6.8.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -7,7 +7,7 @@ import { sizes } from '../../../../theme/shared/breakpoint';
7
7
  import NavHelper from '../../../../utils/navHelper';
8
8
  import { InternalLinkHelper } from '../../../../utils/internalLinkHelper';
9
9
  import whiteListed from '../../../../utils/whiteListed';
10
- import ChevronDown from './chevron-down.svg';
10
+ import chevronDown from './chevron-down.svg';
11
11
 
12
12
  import {
13
13
  Nav,
@@ -100,6 +100,13 @@ const MainNav = ({ navItems }) => {
100
100
  role="button"
101
101
  >
102
102
  {thisFirstChild.title}
103
+ {hasSubMenu
104
+ && (
105
+ <ChevronWrapper>
106
+ <img src={chevronDown} alt="chevron down icon" />
107
+ </ChevronWrapper>
108
+ )
109
+ }
103
110
  </NavLink>
104
111
  ) : (
105
112
  <Text>
@@ -114,7 +121,7 @@ const MainNav = ({ navItems }) => {
114
121
  {hasSubMenu
115
122
  && (
116
123
  <ChevronWrapper>
117
- <img src={ChevronDown} alt="chevron down icon" />
124
+ <img src={chevronDown} alt="chevron down icon" />
118
125
  </ChevronWrapper>
119
126
  )
120
127
  }