Send request body

This commit is contained in:
Gregory Schier
2023-02-24 16:09:19 -08:00
parent 76e398b8a1
commit 856d13c603
4 changed files with 45 additions and 11 deletions

View File

@@ -4,9 +4,14 @@ import './Editor.css';
interface Props {
contentType: string;
value: string;
onChange?: (value: string) => void;
}
export default function Editor(props: Props) {
const { ref } = useCodeMirror({ value: props.value, contentType: props.contentType });
const { ref } = useCodeMirror({
value: props.value,
contentType: props.contentType,
onChange: props.onChange,
});
return <div ref={ref} className="cm-wrapper" />;
}