mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-11 21:11:36 +01:00
13 lines
329 B
TypeScript
13 lines
329 B
TypeScript
import useCodeMirror from '../../hooks/useCodemirror';
|
|
import './Editor.css';
|
|
|
|
interface Props {
|
|
contentType: string;
|
|
value: string;
|
|
}
|
|
|
|
export default function Editor(props: Props) {
|
|
const { ref } = useCodeMirror({ value: props.value, contentType: props.contentType });
|
|
return <div ref={ref} className="cm-wrapper" />;
|
|
}
|