Skip to content

Commit

Permalink
Pass props to single child even if not using a wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
jdlehman committed Nov 9, 2015
1 parent 56ecbb2 commit 27c09e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ var mq = React.createClass({
props,
this.props.children
);
} else if (props) {
return React.cloneElement(
this.props.children,
props
);
} else {
return this.props.children;
}
Expand Down

0 comments on commit 27c09e5

Please sign in to comment.