import React, { Component } from 'react';
import PropTypes from 'prop-types';

import Editor from '../Editor/Editor';

class InstructionsEditor extends Component {
  render() {
    const { code, onAnyCode } = this.props; 
    return (
      <div>
        <Editor
          showLints={false}
          onAnyCode={onAnyCode}
          code={code}
        />
      </div>
    );
  }
}

InstructionsEditor.propTypes = {
  code: PropTypes.string,
};

InstructionsEditor.defaultProps = {
  code: '',
};

export default InstructionsEditor;
