import React from 'react'; import classNames from 'classnames'; import { connect } from 'react-redux'; import Branding from './Branding'; import Link from './Link'; import LogoLink from './LogoLink'; import Search from './Search'; import { getItemPageNames } from '../../common/config'; import actions from '../actions'; class Header extends React.Component { constructor(...args) { super(...args); this.state = { searchOpen: false, search: '', }; } openSearch = () => { this.setState({ searchOpen: true, }); } closeSearch = () => { this.setState({ searchOpen: false, }); } handleSearchChange = (search) => { this.setState({ search, }); } handleSearchSubmit = () => { this.props.navigate('overview', true, { search: this.state.search, }); this.setState({ searchOpen: false, search: '', }); } handleOpenClick = (e) => { e.preventDefault(); this.openSearch(); setTimeout(() => { this.search.focus(); }, 0); } render() { const { pageName } = this.props; const { searchOpen } = this.state; const smallLogo = pageName !== 'index'; return ( } >
How to Use Technology Radar?
Technologies Overview
Search
{ this.search = s; }} />
); } } export default connect( undefined, actions )(Header);