/* eslint-disable jsx-a11y/accessible-emoji */ /* @flow */ import React from 'react'; import styled from 'styled-components'; import { NavLink } from 'react-router-dom'; import colors from 'config/colors'; import { SCREEN_SIZE } from 'config/variables'; import Icon from 'components/Icon'; import icons from 'config/icons'; import { FormattedMessage } from 'react-intl'; import type { toggleSidebar as toggleSidebarType } from 'actions/WalletActions'; import l10nMessages from './index.messages'; import LanguagePicker from './components/LanguagePicker/Container'; const Wrapper = styled.header` width: 100%; height: 52px; background: ${colors.HEADER}; z-index: 200; `; const LayoutWrapper = styled.div` width: 100%; height: 100%; max-width: 1170px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; @media screen and (max-width: 1170px) { padding: 0 25px; } `; const Left = styled.div` display: none; flex: 0 0 33%; @media screen and (max-width: ${SCREEN_SIZE.SM}) { display: initial; } `; const MenuToggler = styled.div` display: none; white-space: nowrap; color: ${colors.WHITE}; align-self: center; align-items: center; cursor: pointer; user-select: none; padding: 10px 0px; transition: all 0.1s ease-in; @media screen and (max-width: ${SCREEN_SIZE.SM}) { display: flex; } `; const TogglerText = styled.div``; const TREZOR = styled.div``; const T = styled.div``; const Logo = styled.div` flex: 1; justify-content: flex-start; display: flex; ${T} { display: none; width: 20px; } ${TREZOR} { width: 100px; } svg { fill: ${colors.WHITE}; height: 28px; } @media screen and (max-width: ${SCREEN_SIZE.SM}) { flex: 1 0 33%; justify-content: center; } @media screen and (max-width: ${SCREEN_SIZE.XS}) { /* hides full width trezor logo, shows only trezor icon */ ${TREZOR} { display: none; } ${T} { display: inherit; } } `; const MenuLinks = styled.div` display: flex; align-content: center; justify-content: flex-end; flex: 0; height: 100%; @media screen and (max-width: ${SCREEN_SIZE.SM}) { flex: 0 1 33%; } `; const Projects = styled.div` display: flex; align-items: center; height: 100%; border-right: 1px solid ${colors.HEADER_DIVIDER}; padding-right: 24px; margin-right: 24px; @media screen and (max-width: ${SCREEN_SIZE.SM}) { display: none; } `; const A = styled.a` color: ${colors.WHITE}; margin-left: 24px; transition: all 0.1s ease-in; white-space: nowrap; &:visited { color: ${colors.WHITE}; margin-left: 24px; } &:first-child { margin: 0px; } &:hover, &:active { color: ${colors.TEXT_SECONDARY}; } `; type Props = { sidebarEnabled?: boolean, sidebarOpened?: ?boolean, toggleSidebar?: toggleSidebarType, }; const Header = ({ sidebarEnabled, sidebarOpened, toggleSidebar }: Props) => ( {sidebarEnabled && ( {sidebarOpened ? ( <> ) : ( <> )} )} ); export default Header;