Skip to content

Added elementType prop to component to override the default H1#32

Open
michaeloryl wants to merge 5 commits intokevoese:developfrom
michaeloryl:master
Open

Added elementType prop to component to override the default H1#32
michaeloryl wants to merge 5 commits intokevoese:developfrom
michaeloryl:master

Conversation

@michaeloryl
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants