import CodeEditor from '@uiw/react-textarea-code-editor'; import { useEffect, useState } from 'react'; import { clsx } from 'clsx'; type Props = { value?: string; onChange?: (evn: React.ChangeEvent) => void; readonly?: boolean; className?: string; }; export const TextArea = (props: Props) => { const [code, setCode] = useState(''); useEffect(() => { setCode(props.value || ''); }, []); return (
setCode(evn.target.value)} padding={10} style={{ backgroundColor: '#f5f5f5', fontFamily: 'ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace', }} />
); };