mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-21 00:49:17 +01:00
Content type highlighting
This commit is contained in:
@@ -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" />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user