import {  useState } from "react";
import useCreateTextImage from "./useCreateTextImage";


function App() {
  const [text, setText] = useState<string>('');
  const imgRef = useCreateTextImage(text, 'black', 'white', { width: 400, height: 200 });


  return (
    <>
      <textarea
        value={text}
        onChange={(e) => setText(e.target.value)}
      />
      <img ref={imgRef} alt={text} />

    </>
  );
}

export default App
