diff options
author | Clemens <cle1000.cb@gmail.com> | 2016-07-15 14:41:30 +0200 |
---|---|---|
committer | Clemens <cle1000.cb@gmail.com> | 2016-07-15 14:41:30 +0200 |
commit | 87797d7ac07108ce5fd00902918e4900907b94b6 (patch) | |
tree | da021755cc692b33ccf33eb3ebd8cd8ba89a8868 /web/src/js/components/ContentView/ContentEditor.jsx | |
parent | 5f3782dd5fb8be4c196f57cb07fd1cc2fd6b2f56 (diff) | |
download | mitmproxy-87797d7ac07108ce5fd00902918e4900907b94b6.tar.gz mitmproxy-87797d7ac07108ce5fd00902918e4900907b94b6.tar.bz2 mitmproxy-87797d7ac07108ce5fd00902918e4900907b94b6.zip |
added new btn, changed to codemirror
Diffstat (limited to 'web/src/js/components/ContentView/ContentEditor.jsx')
-rw-r--r-- | web/src/js/components/ContentView/ContentEditor.jsx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/web/src/js/components/ContentView/ContentEditor.jsx b/web/src/js/components/ContentView/ContentEditor.jsx index a38e4d6f..ca2f3370 100644 --- a/web/src/js/components/ContentView/ContentEditor.jsx +++ b/web/src/js/components/ContentView/ContentEditor.jsx @@ -6,7 +6,6 @@ export default class ContentEditor extends Component { static propTypes = { content: PropTypes.string.isRequired, onSave: PropTypes.func.isRequired, - onClose: PropTypes.func.isRequired, onOpen: PropTypes.func.isRequired, isClosed: PropTypes.bool.isRequired } @@ -20,17 +19,12 @@ export default class ContentEditor extends Component { return ( <div> {this.props.isClosed ? - <a className="btn btn-default btn-xs pull-right" onClick={this.props.onOpen}> - <i className="fa fa-pencil-square-o"/> + <a className="edit-flow" onClick={this.props.onOpen}> + <i className="fa fa-pencil"/> </a> : - <span> - <a className="btn btn-default btn-xs pull-right" onClick={this.props.onClose}> - <i className="fa fa-times"/> - </a> - <a className="btn btn-default btn-xs pull-right" onClick={() => this.props.onSave(this.state.content)}> - <i className="fa fa-floppy-o"/> - </a> - </span> + <a className="edit-flow" onClick={() => this.props.onSave(this.state.content)}> + <i className="fa fa-check"/> + </a> } {!this.props.isClosed && <CodeEditor value={this.state.content} onChange={content => this.setState({content: content})}/> |