import { useEffect, useRef } from 'react'; const TextInput = ({ isTyping, textInputRef, textInput, setTextInput, handleTextInput, textPosition }) => { if (!isTyping) { return null; } return (
setTextInput(e.target.value)} onKeyDown={handleTextInput} placeholder="Type text..." className="w-full p-2 bg-gray-50 border border-gray-200 rounded-lg text-gray-800 focus:outline-none focus:ring-2 focus:ring-gray-400" aria-label="Text input for canvas" />
); }; export default TextInput;