react-typing-animation
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -93,3 +93,3 @@ 'use strict'; | ||
if (text.length === 1) { | ||
return [text.shift() === '' ? undefined : node, hideCursor ? null : cursor]; | ||
return _react.Children.toArray([text.shift() === '' ? undefined : node, hideCursor ? null : cursor]); | ||
} | ||
@@ -96,0 +96,0 @@ return text.shift() === '' ? undefined : node; |
@@ -24,4 +24,4 @@ import React, { Component } from 'react'; | ||
onStartedTyping={() => console.log('started typing')} | ||
onBeforeType={(text) => console.log('onBeforeType', text)} | ||
onAfterType={(text) => console.log('onAfterType', text)} | ||
onBeforeType={text => console.log('onBeforeType', text)} | ||
onAfterType={text => console.log('onAfterType', text)} | ||
> | ||
@@ -28,0 +28,0 @@ <h1> |
{ | ||
"name": "react-typing-animation", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"author": "Adam King https://github.com/adamjking3", | ||
@@ -5,0 +5,0 @@ "homepage": "https://adamjking3.github.io/react-typing-animation-example/", |
@@ -38,3 +38,3 @@ import React, { Component } from 'react'; | ||
requestAnimationFrame(this.beginTyping); | ||
}) | ||
}); | ||
} | ||
@@ -201,3 +201,8 @@ | ||
const filled = replaceTreeText(children, text, cursor, isFinished || hideCursor) | ||
const filled = replaceTreeText( | ||
children, | ||
text, | ||
cursor, | ||
isFinished || hideCursor | ||
); | ||
@@ -204,0 +209,0 @@ return <div className={className}>{filled}</div>; |
@@ -92,3 +92,6 @@ import React, { Children } from 'react'; | ||
if (text.length === 1) { | ||
return [text.shift() === '' ? undefined : node, hideCursor ? null : cursor]; | ||
return Children.toArray([ | ||
text.shift() === '' ? undefined : node, | ||
hideCursor ? null : cursor, | ||
]); | ||
} | ||
@@ -95,0 +98,0 @@ return text.shift() === '' ? undefined : node; |
5846132
1417