From b8847c3dd174c38ae60c907995a7662f32ee2072 Mon Sep 17 00:00:00 2001 From: Kfir Date: Wed, 8 Jan 2020 22:51:23 +0200 Subject: [PATCH] Navbar created --- src/App.js | 6 ++++- src/components/Navbar.js | 48 ++++++++++++++++++++++++++++++++++++++ src/components/NavbarLi.js | 21 +++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 src/components/Navbar.js create mode 100644 src/components/NavbarLi.js diff --git a/src/App.js b/src/App.js index acced9d..90d1bb1 100644 --- a/src/App.js +++ b/src/App.js @@ -1,11 +1,15 @@ import React, { Component } from 'react'; import Todolist from './components/TodoList'; +import Navbar from './components/Navbar'; import './App.css'; class App extends Component { render() { return ( - +
+ + +
); } } diff --git a/src/components/Navbar.js b/src/components/Navbar.js new file mode 100644 index 0000000..8767165 --- /dev/null +++ b/src/components/Navbar.js @@ -0,0 +1,48 @@ +import React from 'react'; +import NavbarLi from './NavbarLi'; +import 'bootstrap/dist/css/bootstrap.min.css'; + + class Navbar extends React.Component { + constructor(props) { + super(props) + this.state = { + navbarLinks:[ + {navTitle: 'Home' , href: 'home'}, + {navTitle: 'Blog' , href: 'blog'}, + {navTitle: 'Contact Us', navTitle: 'contact'}, + {navTitle: 'About', navTitle: 'about'} + ] + } + } + render(){ + return( + + + ) + } + } + + export default Navbar diff --git a/src/components/NavbarLi.js b/src/components/NavbarLi.js new file mode 100644 index 0000000..b63f3a0 --- /dev/null +++ b/src/components/NavbarLi.js @@ -0,0 +1,21 @@ +import React from 'react'; +import 'bootstrap/dist/css/bootstrap.min.css'; + + +class NavbarLi extends React.Component { + constructor(props) { + super(props) + this.state = { + + } + } + render(){ + return( +
  • + {this.props.navTitle} +
  • + ) + } + } + + export default NavbarLi