Skip to content

Commit 0dd65b4

Browse files
committed
Resolve an issue of passing unknown props to the container div (#6)
1 parent 7cadfc9 commit 0dd65b4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/index.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = class extends React.Component {
2525
};
2626

2727
componentDidMount() {
28-
const { children, className, ...options } = this.props;
28+
const { children, className, style, ...options } = this.props;
2929

3030
const el = ReactDOM.findDOMNode(this);
3131
options.el = el;
@@ -67,8 +67,12 @@ module.exports = class extends React.Component {
6767
this.tree = null;
6868
}
6969
render() {
70+
const { children, className, style } = this.props;
71+
7072
return (
71-
<div {...this.props} />
73+
<div className={className} style={style}>
74+
{children}
75+
</div>
7276
);
7377
}
7478
};

0 commit comments

Comments
 (0)