Advertisement
Eulis

Header index js

Jan 21st, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. import React from 'react';
  2.  
  3. import PropTypes from 'prop-types';
  4.  
  5. import Login from '~/pages/Login';
  6.  
  7. import { Wrap, Container, LogoHeader, User, Nav, Main } from './styles';
  8.  
  9. import LogoPrimary from '~/assets/img/logo.svg';
  10. import LogoSecondary from '~/assets/img/logo_jetpax_color.svg';
  11. import UserImg from '~/assets/img/menu usuario.svg';
  12.  
  13. export default function Header({ themesPrimary, themesSecondary }) {
  14. function showLoginBox() {
  15. document.getElementById('login').style.display = 'flex';
  16. }
  17. return (
  18. <Wrap>
  19. <Container
  20. themesPrimary={themesPrimary}
  21. themesSecondary={themesSecondary}
  22. >
  23. <Nav>
  24. {themesPrimary && <LogoHeader src={LogoPrimary} />}
  25. {themesSecondary && <LogoHeader src={LogoSecondary} />}
  26. </Nav>
  27. <Main themesPrimary={themesPrimary} themesSecondary={themesSecondary}>
  28. <nav>
  29. <ul>
  30. <li href="#">INÍCIO</li>
  31. <li href="#">DESCUBRA</li>
  32.  
  33. <li href="#"> ENTREGA</li>
  34. <li href="#">CONTATO</li>
  35. <li>
  36. <User src={UserImg} onClick={showLoginBox} />
  37. </li>
  38. </ul>
  39. </nav>
  40. <Login />
  41. </Main>
  42. </Container>
  43. </Wrap>
  44. );
  45. }
  46.  
  47. Header.propTypes = {
  48. themesPrimary: PropTypes.bool.isRequired,
  49. themesSecondary: PropTypes.bool.isRequired,
  50. };
  51.  
  52. Header.defaultPropTypes = {
  53. themesPrimary: false,
  54. themesSecondary: false,
  55. active: false,
  56. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement