forked from newthuhole/hole_thu_frontend
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
39 lines
1.0 KiB
import React, {Component} from 'react'; |
|
import {Flow} from './Flows'; |
|
import {Title} from './Title'; |
|
import {Sidebar} from './Sidebar'; |
|
|
|
class App extends Component { |
|
constructor(props) { |
|
super(props); |
|
this.state={ |
|
sidebar_title: null, |
|
sidebar_content: null, |
|
}; |
|
} |
|
|
|
show_sidebar(title,content) { |
|
this.setState({ |
|
sidebar_title: title, |
|
sidebar_content: content, |
|
}); |
|
} |
|
|
|
render() { |
|
return ( |
|
<div> |
|
<Title callback={this.show_sidebar.bind(this)} /> |
|
<div className="left-container"> |
|
<Flow callback={this.show_sidebar.bind(this)} mode="list" /> |
|
</div> |
|
<Sidebar do_close={()=>{ |
|
this.setState({ |
|
sidebar_content: null, |
|
}); |
|
}} content={this.state.sidebar_content} title={this.state.sidebar_title} /> |
|
</div> |
|
); |
|
} |
|
} |
|
|
|
export default App;
|
|
|