Skip to content

Commit

Permalink
fix(style): children was passed to line and media component
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrachet committed Jun 1, 2018
1 parent fe452b5 commit 5b6202b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/placeholderContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import React from 'react';
import PropTypes from 'prop-types';
import Animations from './animation/animations';

const renderAnimation = (Animation, Component, props) => {
const renderAnimation = (Animation, Component, { children, ...otherProps }) => {
if (!Animation) {
throw new Error(`${Animation.name} doesnt exist in the current project`);
}
return (
<Animation>
<Component {...props} />
<Component {...otherProps} />
</Animation>
);
};
Expand All @@ -32,6 +32,7 @@ const connect = (PlaceholderComponent) => {
if (animate) {
return renderAnimation(Animations[animate], PlaceholderComponent, props);
}

return <PlaceholderComponent {...props} />;
}

Expand Down

0 comments on commit 5b6202b

Please sign in to comment.