react-typing-animation
Advanced tools
Comparing version 1.5.1 to 1.6.0
@@ -109,3 +109,2 @@ 'use strict'; | ||
return _context2.abrupt('return', _this.updateState({ | ||
text: [], | ||
toType: (0, _utils.extractText)(_this.props.children), | ||
@@ -463,8 +462,11 @@ cursor: { | ||
hideCursor = _props.hideCursor; | ||
var isFinished = this.state.isFinished; | ||
var _state = this.state, | ||
isFinished = _state.isFinished, | ||
text = _state.text; | ||
var cursor = this.props.cursor || _react2.default.createElement(_Cursor2.default, { className: cursorClassName }); | ||
var filled = isFinished ? children : (0, _utils.replaceTreeText)(children, this.state.text, cursor, hideCursor); | ||
var filled = (0, _utils.replaceTreeText)(children, text, cursor, isFinished || hideCursor); | ||
return _react2.default.createElement( | ||
@@ -471,0 +473,0 @@ 'div', |
{ | ||
"name": "react-typing-animation", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"author": "Adam King https://github.com/adamjking3", | ||
@@ -5,0 +5,0 @@ "homepage": "https://adamjking3.github.io/react-typing-animation-example/", |
@@ -55,3 +55,2 @@ import React, { Component } from 'react'; | ||
this.updateState({ | ||
text: [], | ||
toType: extractText(this.props.children), | ||
@@ -198,9 +197,8 @@ cursor: { | ||
const { children, className, cursorClassName, hideCursor } = this.props; | ||
const { isFinished } = this.state; | ||
const { isFinished, text } = this.state; | ||
const cursor = this.props.cursor || <Cursor className={cursorClassName} />; | ||
const filled = isFinished | ||
? children | ||
: replaceTreeText(children, this.state.text, cursor, hideCursor); | ||
const filled = replaceTreeText(children, text, cursor, isFinished || hideCursor) | ||
return <div className={className}>{filled}</div>; | ||
@@ -207,0 +205,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5846024
1409