react-typewriter
react-typewriter copied to clipboard
Change container element to a div instead of span since span can not have all elements as children according to W3C
W3C threw me an error when having a <p>
element inside react-typewriter
so I'd like to propose to change the container to be a <div>
since it may have any element as a child.
This of course creates the problem in the other direction: now the react-typewriter
can't have any element as a parent. @frostney @ianbjorndilling Any suggestions on how to fix the problem both ways?
@yn5 What do you think about having the container element as a prop? I feel like it should be span
by default. From the top of my head, I some projects I worked on where it would break the layout if the container suddenly changed from span
to div
.
@frostney Sounds like a good solution to me! I've added another commit to implement it.
@frostney What do you think of the code?
@frostney I noticed the PR caused a warning, added another commit to fix that.