Updated navbar and renamed Leds to Resistor

This commit is contained in:
dbroqua 2018-07-31 21:12:16 +02:00
parent 3d861bab52
commit 113f1880f7
2 changed files with 32 additions and 22 deletions

View file

@ -6,13 +6,15 @@ import {
NavbarToggler, NavbarToggler,
NavbarBrand, NavbarBrand,
Nav, Nav,
NavItem, UncontrolledDropdown,
NavLink, DropdownToggle,
DropdownMenu,
DropdownItem,
} from 'reactstrap'; } from 'reactstrap';
import Home from './components/Home'; import Home from './components/Home';
import Wheels from './components/Wheels'; import Wheels from './components/Wheels';
import Gearbox from './components/Gearbox'; import Gearbox from './components/Gearbox';
import Leds from './components/Leds'; import Resistor from './components/Resistor';
import 'bootstrap/dist/css/bootstrap.min.css'; import 'bootstrap/dist/css/bootstrap.min.css';
import './App.css'; import './App.css';
@ -44,21 +46,29 @@ Car tools
<NavbarToggler onClick={this.toggle} /> <NavbarToggler onClick={this.toggle} />
<Collapse isOpen={this.state.isOpen} navbar> <Collapse isOpen={this.state.isOpen} navbar>
<Nav className="ml-auto" navbar> <Nav className="ml-auto" navbar>
<NavItem> <UncontrolledDropdown nav inNavbar>
<NavLink tag={Link} to="/Wheels"> <DropdownToggle nav caret>
Roues Mécanique
</NavLink> </DropdownToggle>
</NavItem> <DropdownMenu right>
<NavItem> <DropdownItem tag={Link} to="/Wheels">
<NavLink tag={Link} to="/Gearbox"> Roues
Boite de vitesse </DropdownItem>
</NavLink> <DropdownItem tag={Link} to="/Gearbox">
</NavItem> Boîte de vitesse
<NavItem> </DropdownItem>
<NavLink tag={Link} to="/Leds"> </DropdownMenu>
Résistances </UncontrolledDropdown>
</NavLink> <UncontrolledDropdown nav inNavbar>
</NavItem> <DropdownToggle nav caret>
Électronique
</DropdownToggle>
<DropdownMenu right>
<DropdownItem tag={Link} to="/Resistor">
Résistance
</DropdownItem>
</DropdownMenu>
</UncontrolledDropdown>
</Nav> </Nav>
</Collapse> </Collapse>
</Navbar> </Navbar>
@ -66,7 +76,7 @@ Résistances
<Route exact path="/" component={Home} /> <Route exact path="/" component={Home} />
<Route exact path="/wheels" component={Wheels} /> <Route exact path="/wheels" component={Wheels} />
<Route exact path="/Gearbox" component={Gearbox} /> <Route exact path="/Gearbox" component={Gearbox} />
<Route exact path="/Leds" component={Leds} /> <Route exact path="/Resistor" component={Resistor} />
</div> </div>
</div> </div>
</Router> </Router>

View file

@ -1,15 +1,15 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
class Leds extends Component { class Resistor extends Component {
render() { render() {
return ( return (
<div> <div>
{' '} {' '}
Leds Resistor
{' '} {' '}
</div> </div>
); );
} }
} }
export default Leds; export default Resistor;