mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
25 lines
538 B
JavaScript
25 lines
538 B
JavaScript
import React, {PropTypes} from 'react';
|
|
import Editor from './base/Editor'
|
|
|
|
const RequestBodyEditor = ({body, contentType, onChange, className}) => (
|
|
<Editor
|
|
value={body}
|
|
className={className}
|
|
onChange={onChange}
|
|
mode={contentType}
|
|
lineWrapping={true}
|
|
placeholder="request body here..."
|
|
/>
|
|
);
|
|
|
|
RequestBodyEditor.propTypes = {
|
|
// Functions
|
|
onChange: PropTypes.func.isRequired,
|
|
|
|
// Other
|
|
body: PropTypes.string.isRequired,
|
|
contentType: PropTypes.string.isRequired
|
|
};
|
|
|
|
export default RequestBodyEditor;
|