Fix navbar not sticky
This commit is contained in:
parent
7cff7bdb0b
commit
d5a754ba73
|
|
@ -10,22 +10,16 @@ import {notify} from 'react-notify-toast';
|
||||||
export class TurniereNavigation extends React.Component {
|
export class TurniereNavigation extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.toggle = this.toggle.bind(this);
|
this.toggle = this.toggle.bind(this);
|
||||||
|
this.state = {collapsed: true};
|
||||||
this.state = {
|
|
||||||
collapsed: true
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
toggle() {
|
toggle() {
|
||||||
this.setState({
|
this.setState({collapsed: !this.state.collapsed});
|
||||||
collapsed: !this.state.collapsed
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (<Navbar color="light" light expand="lg">
|
return (<Navbar color="light" light expand="lg" sticky="top">
|
||||||
<NavbarBrand href="/">turnie.re</NavbarBrand>
|
<NavbarBrand href="/">turnie.re</NavbarBrand>
|
||||||
<NavbarToggler onClick={this.toggle}/>
|
<NavbarToggler onClick={this.toggle}/>
|
||||||
<Collapse isOpen={!this.state.collapsed} navbar>
|
<Collapse isOpen={!this.state.collapsed} navbar>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue