2019-10-08 12:47:11 +07:00
|
|
|
import React from 'react';
|
2019-11-23 19:41:14 +07:00
|
|
|
import styled from '@emotion/styled';
|
2019-10-08 12:47:11 +07:00
|
|
|
import { Link } from 'react-router-dom';
|
|
|
|
|
|
|
|
import Search from '../Search/';
|
|
|
|
|
|
|
|
import HeaderLogo from './HeaderLogo';
|
|
|
|
import { LeftSide, SearchWrapper } from './styles';
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
withoutSearch?: boolean;
|
|
|
|
logo?: string;
|
|
|
|
}
|
|
|
|
|
2019-11-23 19:41:14 +07:00
|
|
|
const StyledLink = styled(Link)({
|
|
|
|
marginRight: '1em',
|
|
|
|
});
|
|
|
|
|
2019-10-08 12:47:11 +07:00
|
|
|
const HeaderLeft: React.FC<Props> = ({ withoutSearch = false, logo }) => (
|
|
|
|
<LeftSide>
|
2019-11-23 19:41:14 +07:00
|
|
|
<StyledLink to={'/'}>
|
2019-10-08 12:47:11 +07:00
|
|
|
<HeaderLogo logo={logo} />
|
2019-11-23 19:41:14 +07:00
|
|
|
</StyledLink>
|
2019-10-08 12:47:11 +07:00
|
|
|
{!withoutSearch && (
|
|
|
|
<SearchWrapper>
|
|
|
|
<Search />
|
|
|
|
</SearchWrapper>
|
|
|
|
)}
|
|
|
|
</LeftSide>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default HeaderLeft;
|