mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-23 02:54:58 +01:00
15 lines
344 B
TypeScript
15 lines
344 B
TypeScript
import useCodeMirror from '../../hooks/useCodemirror';
|
|
import './Editor.css';
|
|
|
|
interface Props {
|
|
contentType: string;
|
|
initialValue?: string;
|
|
value?: string;
|
|
onChange?: (value: string) => void;
|
|
}
|
|
|
|
export default function Editor(props: Props) {
|
|
const { ref } = useCodeMirror(props);
|
|
return <div ref={ref} className="cm-wrapper" />;
|
|
}
|