Skip to content

Commit 79035c3

Browse files
committed
Icon context provider added
1 parent 2238634 commit 79035c3

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

src/components/Navbar/index.js

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useState, useEffect } from 'react';
22
import { FaBars } from 'react-icons/fa';
3+
import { IconContext } from 'react-icons/lib';
34
import { MenuIcon, Nav, NavbarContainer, NavItem, NavLink, NavLogo, NavMenu, NavBtn, NavBtnLink } from './NavbarElements';
45

56
const Navbar = ({ toggle }) => {
@@ -19,33 +20,35 @@ const Navbar = ({ toggle }) => {
1920

2021
return (
2122
<>
22-
<Nav scrollNav={scrollNav}>
23-
<NavbarContainer>
24-
<NavLogo to='/'>
25-
logo
23+
<IconContext.Provider value={{ color: '#fff' }}>
24+
<Nav scrollNav={scrollNav}>
25+
<NavbarContainer>
26+
<NavLogo to='/'>
27+
logo
2628
</NavLogo>
27-
<MenuIcon onClick={toggle}>
28-
<FaBars />
29-
</MenuIcon>
30-
<NavMenu>
31-
<NavItem>
32-
<NavLink to='about'>About</NavLink>
33-
</NavItem>
34-
<NavItem>
35-
<NavLink to='discover'>Discover</NavLink>
36-
</NavItem>
37-
<NavItem>
38-
<NavLink to='services'>Services</NavLink>
39-
</NavItem>
40-
<NavItem>
41-
<NavLink to='signup'>Sign Up</NavLink>
42-
</NavItem>
43-
</NavMenu>
44-
<NavBtn>
45-
<NavBtnLink to="/signin">Sign In</NavBtnLink>
46-
</NavBtn>
47-
</NavbarContainer>
48-
</Nav>
29+
<MenuIcon onClick={toggle}>
30+
<FaBars />
31+
</MenuIcon>
32+
<NavMenu>
33+
<NavItem>
34+
<NavLink to='about'>About</NavLink>
35+
</NavItem>
36+
<NavItem>
37+
<NavLink to='discover'>Discover</NavLink>
38+
</NavItem>
39+
<NavItem>
40+
<NavLink to='services'>Services</NavLink>
41+
</NavItem>
42+
<NavItem>
43+
<NavLink to='signup'>Sign Up</NavLink>
44+
</NavItem>
45+
</NavMenu>
46+
<NavBtn>
47+
<NavBtnLink to="/signin">Sign In</NavBtnLink>
48+
</NavBtn>
49+
</NavbarContainer>
50+
</Nav>
51+
</IconContext.Provider>
4952
</>
5053
);
5154
};

0 commit comments

Comments
 (0)