react-typewriter-effect icon indicating copy to clipboard operation
react-typewriter-effect copied to clipboard

Added elementType prop to component to override the default H1

Open michaeloryl opened this issue 1 year ago • 0 comments

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.

michaeloryl avatar May 17 '23 12:05 michaeloryl