Files
insomnia/app/components/RequestBodyEditor.js
Gregory Schier e9d64ebb23 Workspaces (#7)
* Got a hacky workspace implementation running

* Removed some hax with reducer composition

* Moved some more around

* Moved files back out

* Started on entities reducer

* Split up some components

* Moved nested modules back out of workspaces

* Started on new Sidebar tree stuff

* Better store stuff

* Some more tweaks

* Removed workspace update action

* Re-implemented filtering in the Sidbare

* Switch to get the newest response
2016-04-26 00:29:24 -07:00

35 lines
778 B
JavaScript

import React, {Component, PropTypes} from 'react';
import Editor from './base/Editor'
class RequestBodyEditor extends Component {
render () {
const {body, contentType, requestId, onChange, className} = this.props;
return (
<Editor
value={body}
className={className}
debounceMillis={400}
onChange={onChange}
uniquenessKey={requestId}
options={{
mode: contentType,
placeholder: 'request body here...'
}}
/>
)
}
}
RequestBodyEditor.propTypes = {
// Functions
onChange: PropTypes.func.isRequired,
// Other
requestId: PropTypes.string.isRequired,
body: PropTypes.string.isRequired,
contentType: PropTypes.string.isRequired
};
export default RequestBodyEditor;