mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
5d5d6eecc4
* Basic import summary * Started (broken)
42 lines
822 B
JavaScript
42 lines
822 B
JavaScript
import React, {PropTypes, Component} from 'react';
|
|
import Editor from '../../base/Editor';
|
|
|
|
class RawEditor extends Component {
|
|
render () {
|
|
const {
|
|
contentType,
|
|
content,
|
|
fontSize,
|
|
lineWrapping,
|
|
onChange,
|
|
className
|
|
} = this.props;
|
|
|
|
return (
|
|
<Editor
|
|
manualPrettify={true}
|
|
fontSize={fontSize}
|
|
value={content}
|
|
className={className}
|
|
onChange={onChange}
|
|
mode={contentType}
|
|
lineWrapping={lineWrapping}
|
|
placeholder="..."
|
|
/>
|
|
)
|
|
}
|
|
}
|
|
|
|
RawEditor.propTypes = {
|
|
// Required
|
|
onChange: PropTypes.func.isRequired,
|
|
content: PropTypes.string.isRequired,
|
|
contentType: PropTypes.string.isRequired,
|
|
|
|
// Optional
|
|
fontSize: PropTypes.number,
|
|
lineWrapping: PropTypes.bool
|
|
};
|
|
|
|
export default RawEditor;
|