Content type highlighting

This commit is contained in:
Gregory Schier
2023-02-18 21:41:23 -08:00
parent d5649b0925
commit 0a0839cc3c
4 changed files with 30 additions and 12 deletions

View File

@@ -2,11 +2,11 @@ import useCodeMirror, { EditorLanguage } from '../../hooks/useCodemirror';
import './Editor.css';
interface Props {
language: EditorLanguage;
contentType: string;
value: string;
}
export default function Editor(props: Props) {
const { ref } = useCodeMirror({ value: props.value, language: props.language });
const { ref } = useCodeMirror({ value: props.value, contentType: props.contentType });
return <div ref={ref} className="m-0 text-sm overflow-hidden" />;
}