Skip to content

Commit

Permalink
feat(Header): add hideSearch prop
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed Dec 7, 2022
1 parent 880c0aa commit 13ddfe5
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/ui/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const Main = ({
pathname,
transparency,
inverted,
hideSearch,
}) => {
const history = useHistory();
const [activeItem, setActiveItem] = React.useState(pathname);
Expand Down Expand Up @@ -231,18 +232,20 @@ const Main = ({
))}
</div>
)}
<div
className="search-action"
onClick={searchOnClick}
role="none"
ref={searchButtonRef}
>
{/* <Icon name={!state.activeSearch ? 'search' : 'close'} /> */}
<Image
src={!searchIsActive ? `${searchIcon}` : `${closeIcon}`}
alt="search button open/close"
/>
</div>
{!hideSearch && (
<div
className="search-action"
onClick={searchOnClick}
role="none"
ref={searchButtonRef}
>
{/* <Icon name={!state.activeSearch ? 'search' : 'close'} /> */}
<Image
src={!searchIsActive ? `${searchIcon}` : `${closeIcon}`}
alt="search button open/close"
/>
</div>
)}
<Header.BurgerAction
className={`mobile ${burger}`}
onClick={mobileBurgerOnClick}
Expand Down

0 comments on commit 13ddfe5

Please sign in to comment.