Newer
Older
/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana
This file is part of Plataforma Integrada MEC.
Plataforma Integrada MEC is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Plataforma Integrada MEC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/
import MenuIcon from '@material-ui/icons/Menu';
import styled from 'styled-components'
import logo from '../img/logo_small.svg'
import MobileDrawerMenu from './MobileDrawerMenu';
import IconSearch from '@material-ui/icons/Search'
const [drawerOpen, setDrawerStatus] = React.useState(false);
const toggleDrawer = (open) => (event) => {
if (event.type === 'keydown' && (event.key === 'Tab' || event.key === 'Shift')) {
return;
}
setDrawerStatus(open);
};
return (
<MobileDrawerMenu
contrast={props.contrast}
anchor={'left'}
open={drawerOpen}
onClose={toggleDrawer(false)}
openSignUp={props.openSignUp} openLogin={props.openLogin}
/>
<OuterDiv contrast={props.contrast}>
<Button style={props.contrast === "" ? { color: "#00bcd4" } : { color: "white " }} onClick={toggleDrawer(true)}>
<MenuIcon className="icon" />
</Button>
<DrawerButtonDiv>
<Link to={"/"}>
<img src={logo} alt="logo" style={{ border: "0", verticalAlign: "middle" }} />
<Button style={{ position: "absolute", right: 0 }} onClick={props.openSearchBar}>
<IconSearchStyled style={props.contrast === "" ? { color: "#00bcd4" } : { color: "white " }} />
)
}
height : 48px;
background: ${props => props.contrast === "" ? "" : "black"};
display : flex;
direction : row;
height : 38px;
overflow : hidden;
}
`
height : 38px;
width : 45.55px;
position:absolute;
left:0;
right:0;
margin-left:auto;
margin-right:auto;