mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 19:32:45 +00:00
Editor working
This commit is contained in:
@@ -5,9 +5,29 @@ var cx = require('classnames');
|
||||
var Nav = require('naturalcrit/nav/nav.jsx');
|
||||
var Navbar = require('./navbar/navbar.jsx');
|
||||
|
||||
var SplitPane = require('naturalcrit/splitPane/splitPane.jsx');
|
||||
var SheetEditor = require('./sheetEditor/sheetEditor.jsx');
|
||||
|
||||
|
||||
var TPK = React.createClass({
|
||||
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
sheetCode: ''
|
||||
};
|
||||
},
|
||||
|
||||
handleSplitMove : function(){
|
||||
this.refs.editor.update();
|
||||
},
|
||||
|
||||
handleCodeChange : function(code){
|
||||
this.setState({
|
||||
sheetCode : code
|
||||
})
|
||||
},
|
||||
|
||||
render : function(){
|
||||
return <div className='tpk page'>
|
||||
<Navbar>
|
||||
@@ -18,9 +38,12 @@ var TPK = React.createClass({
|
||||
</Nav.section>
|
||||
</Navbar>
|
||||
<div className='content'>
|
||||
|
||||
Holla y'all
|
||||
|
||||
<SplitPane onDragFinish={this.handleSplitMove} ref='pane'>
|
||||
<SheetEditor value={this.state.sheetCode} onChange={this.handleCodeChange} ref='editor' />
|
||||
<div>
|
||||
{this.state.sheetCode}
|
||||
</div>
|
||||
</SplitPane>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user