insomnia/app/components/RequestBodyEditor.js
2016-04-29 01:15:37 -07:00

24 lines
525 B
JavaScript

import React, {Component, PropTypes} from 'react';
import Editor from './base/Editor'
const RequestBodyEditor = ({body, contentType, onChange, className}) => (
<Editor
value={body}
className={className}
onChange={onChange}
mode={contentType}
placeholder="request body here..."
/>
);
RequestBodyEditor.propTypes = {
// Functions
onChange: PropTypes.func.isRequired,
// Other
body: PropTypes.string.isRequired,
contentType: PropTypes.string.isRequired
};
export default RequestBodyEditor;