import React from 'react';
import PropTypes from 'prop-types';

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

const TestSpecEditor = ({ code, onAnyCode }) => (
  <div>
    <Editor
      onAnyCode={onAnyCode}
      code={code}
    />
  </div>
);

TestSpecEditor.propTypes = {
  code: PropTypes.string,
  onAnyCode: PropTypes.func.isRequired,
};

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

export default TestSpecEditor;
