import React from "react" import { BodyInputText } from "./style" export interface TextEditorProps { value: string, onChange: (value: string) => void, onEditting: (editting: boolean) => void, } export const TextEditor: React.FC = ({ value, onChange, onEditting }) => { const [currentInput, setCurrentInput] = React.useState(value); const handleChange = (event: any) => { setCurrentInput(event.target.value); onChange(event.target.value) } return ( onEditting(false)} InputProps={{ autoFocus: true }} /> ) }