Skip to content

Commit 64ee85f

Browse files
committed
Clear props before passing to children to prevent React 15 warnings.
1 parent 8ebae4c commit 64ee85f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-inline-css",
33
"description": "Inline CSS in your React components, namespaced automatically.",
4-
"version": "2.2.0",
4+
"version": "2.3.0",
55
"license": "BSD-3-Clause",
66
"repository": {
77
"type": "git",

src/react-inline-css.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ var InlineCss = React.createClass({
3636
var Wrapper = this.props.wrapper || "div";
3737

3838
var wrapperProps = assign({}, this.props, {
39-
namespace: undefined,
40-
componentName: undefined,
41-
stylesheet: undefined,
42-
wrapper: undefined,
43-
id: namespace
39+
id: namespace
4440
});
4541

42+
delete wrapperProps.namespace;
43+
delete wrapperProps.componentName;
44+
delete wrapperProps.stylesheet;
45+
delete wrapperProps.wrapper;
46+
4647
return React.createElement(
4748
Wrapper,
4849
wrapperProps,

0 commit comments

Comments
 (0)