react-typewriter-effect
react-typewriter-effect copied to clipboard
Added elementType prop to component to override the default H1
You can now pass in a parameter to change the type of element that wraps the typewriter-effect text. You can pass in a string (such as 'h1' or 'div') or you can pass in a React component. If nothing is passed in, it defaults to 'h1' to maintain backwards compatibility.
Additionally, the element used for the cursor was changed from a DIV to a SPAN, because you can't put DIVs in certain other container elements legally (like H1). Span works fine in this case.
I also fixed some grammar issues, and sorted some of the properties listed in code.