mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 17:22:49 +00:00
Added smart componenets, page line number highlighting
This commit is contained in:
@@ -6,7 +6,6 @@ const CodeEditor = require('naturalcrit/codeEditor/codeEditor.jsx');
|
||||
const SnippetBar = require('./snippetbar/snippetbar.jsx');
|
||||
const MetadataEditor = require('./metadataEditor/metadataEditor.jsx');
|
||||
|
||||
|
||||
const splice = function(str, index, inject){
|
||||
return str.slice(0, index) + inject + str.slice(index);
|
||||
};
|
||||
@@ -138,8 +137,3 @@ const Editor = React.createClass({
|
||||
|
||||
module.exports = Editor;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
13
client/homebrew/editor/editor.smart.jsx
Normal file
13
client/homebrew/editor/editor.smart.jsx
Normal file
@@ -0,0 +1,13 @@
|
||||
const Actions = require('homebrewery/brew.actions.js');
|
||||
const Store = require('homebrewery/brew.store.js');
|
||||
|
||||
const Editor = require('./editor.jsx')
|
||||
|
||||
module.exports = Store.createSmartComponent(Editor, ()=>{
|
||||
return {
|
||||
value : Store.getBrewText(),
|
||||
onChange : Actions.updateBrewText,
|
||||
metadata : Store.getMetaData(),
|
||||
onMetadataChange : Actions.updateMetaData,
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user