@qlean/york-web
Advanced tools
Comparing version 0.3.6-alfa-1 to 0.3.6-alfa-2
{ | ||
"name": "@qlean/york-web", | ||
"version": "0.3.6-alfa-1", | ||
"version": "0.3.6-alfa-2", | ||
"description": "", | ||
@@ -24,2 +24,3 @@ "main": "dist/main.js", | ||
"babel-core": "^6.26.3", | ||
"babel-eslint": "^10.0.1", | ||
"babel-loader": "^7.1.5", | ||
@@ -26,0 +27,0 @@ "babel-plugin-inline-react-svg": "^0.5.4", |
import React, { Component } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import styled from 'styled-components'; | ||
@@ -8,3 +9,2 @@ | ||
import Header from './Header'; | ||
import { withResponsiveProps } from '../../utils/styles'; | ||
@@ -16,2 +16,20 @@ const StyledNavigation = styled(FlexBase)` | ||
class NewNavigation extends Component { | ||
static propTypes = { | ||
menuItems: PropTypes.arrayOf( | ||
PropTypes.shape({ | ||
title: PropTypes.string.isRequired, | ||
items: PropTypes.arrayOf( | ||
PropTypes.shape({ | ||
title: PropTypes.string.isRequired, | ||
href: PropTypes.string, | ||
}).isRequired, | ||
).isRequired, | ||
isMobileTitleHidden: PropTypes.bool, | ||
isTooltip: PropTypes.bool, | ||
}).isRequired, | ||
).isRequired, | ||
preset: PropTypes.oneOf(['lightBackground', 'darkBackground']), | ||
presetMobile: PropTypes.oneOf(['lightBackground', 'darkBackground']), | ||
} | ||
state = { | ||
@@ -32,4 +50,9 @@ isMenuOpened: false, | ||
> | ||
<Header preset={preset} presetMobile={presetMobile} isMenuOpened={isMenuOpened} toggleMenu={this.toggleMenu}/> | ||
<Menu preset={preset} isMenuOpened={isMenuOpened} links={menuItems}/> | ||
<Header | ||
preset={preset} | ||
presetMobile={presetMobile} | ||
isMenuOpened={isMenuOpened} | ||
toggleMenu={this.toggleMenu} | ||
/> | ||
<Menu preset={preset} isMenuOpened={isMenuOpened} menuItems={menuItems}/> | ||
</StyledNavigation> | ||
@@ -40,4 +63,2 @@ ); | ||
export default withResponsiveProps([ | ||
{ name: 'preset', defaultValue: 'lightBackground' }, | ||
])(NewNavigation); | ||
export default NewNavigation; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
3
259336
27
42
2370