Skip to content

Commit

Permalink
Fix adding minDelay, maxDelay and typing to container element (which …
Browse files Browse the repository at this point in the history
…is a span or div)
  • Loading branch information
yn5 committed Aug 2, 2016
1 parent bd6d4ea commit 92a8992
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/TypeWriter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class TypeWriter extends React.Component {
}

render() {
const {
let {
children,
fixed,
container,
Expand All @@ -104,9 +104,14 @@ class TypeWriter extends React.Component {
} = this.state;

const Container = container;
const containerComponent = <Container {...props}>{children}</Container>;
const hideStyle = fixed ? {visibility: 'hidden'} : {display: 'none'};

delete props.minDelay;
delete props.maxDelay;
delete props.typing;

const containerComponent = <Container {...props}>{children}</Container>;

return styleComponentSubstring(containerComponent, hideStyle, visibleChars);
}

Expand Down

0 comments on commit 92a8992

Please sign in to comment.