forked from hull-ships/hull-processor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.jsx
More file actions
41 lines (31 loc) · 1.04 KB
/
index.jsx
File metadata and controls
41 lines (31 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React, { Component } from 'react';
import Codemirror from '../ui/react-codemirror';
import { Col, Button, Tabs, Tab, Well } from 'react-bootstrap';
import Header from '../ui/header';
import Icon from '../ui/icon';
require('codemirror/mode/javascript/javascript');
const HelpText = `Mardown here ?`;
export default class Code extends Component {
constructor(props) {
super(props);
this.state = { activeKey: 'code' };
}
handleSwitchTab(activeKey) {
this.setState({ activeKey });
}
render() {
const options = {
mode: "javascript",
lineNumbers: true,
gutters: ["CodeMirror-lint-markers"],
lint: true
};
const { className, sm, md, onChange, value } = this.props;
const title = <span>Code <small> Write code below, see preview on right. Click save when done</small></span>
return <Col className={className} md={md} sm={sm}>
<Header title={title}/>
<hr/>
<Codemirror style={{ height: "auto" }} value={value} onChange={onChange} options={options} />
</Col>
}
}