1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-04 21:54:30 +07:00
verdaccio-ui/src/components/Header/HeaderLeft.tsx
Priscila Oliveira d1ce82854a fix: Header Component - Replaced class by func. comp (#142)
* refactor: replaced class by func.comp

* refactor: replacing jest test by react-testing-library

* refactor: added test todos

* feat: added more unit tests

* fix: fixed tooltip import

* fix: fixed test

* fix: fixed typo

* fix: fixed imports
2019-10-08 07:47:11 +02:00

33 lines
649 B
TypeScript

import React from 'react';
import { css } from 'emotion';
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;
}
const HeaderLeft: React.FC<Props> = ({ withoutSearch = false, logo }) => (
<LeftSide>
<Link
className={css`
margin-right: 1em;
`}
to={'/'}>
<HeaderLogo logo={logo} />
</Link>
{!withoutSearch && (
<SearchWrapper>
<Search />
</SearchWrapper>
)}
</LeftSide>
);
export default HeaderLeft;