--- /dev/null
+import { html } from '@codemirror/lang-html';
+import { EditorView } from '@codemirror/view';
+import PropTypes from 'prop-types';
+import React from 'react';
+import { githubDark } from '@uiw/codemirror-theme-github';
+import CodeMirror from '@uiw/react-codemirror';
+
+const HTMLInput = ({
+ name,
+ onChange,
+ value,
+}) => {
+ const handleChange = React.useCallback((value) => {
+ return onChange({ target: { name, value } });
+ }, [name, onChange]);
+
+ return <CodeMirror
+ extensions={[html(), EditorView.lineWrapping]}
+ onChange={handleChange}
+ theme={githubDark}
+ value={value}
+ />;
+};
+
+HTMLInput.propTypes = {
+ name: PropTypes.string,
+ onChange: PropTypes.func,
+ value: PropTypes.string,
+};
+
+export default HTMLInput;