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

View file

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