Skip to content

Commit

Permalink
Enhancement to allow additional/override container and wrapper styles…
Browse files Browse the repository at this point in the history
… to be passed as props
  • Loading branch information
hburrows committed Oct 31, 2015
1 parent 17e8c89 commit 91c1210
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions react-swipe.js
Expand Up @@ -47,7 +47,9 @@
disableScroll : React.PropTypes.bool,
stopPropagation : React.PropTypes.bool,
callback : React.PropTypes.func,
transitionEnd : React.PropTypes.func
transitionEnd : React.PropTypes.func,
containerStyles : React.PropTypes.object,
wrapperStyles : React.PropTypes.object
},

componentDidMount: function () {
Expand All @@ -73,8 +75,8 @@
},

render: function() {
return React.createElement('div', React.__spread({}, {style: styles.container}, this.props),
React.createElement('div', {style: styles.wrapper},
return React.createElement('div', React.__spread({}, {style: objectAssign({}, styles.container, this.props.containerStyles)}, this.props),
React.createElement('div', {style: objectAssign({}, styles.wrapper, this.props.wrapperStyles)},
React.Children.map(this.props.children, function (child) {
return React.cloneElement(child, {
ref: child.props.ref,
Expand Down

0 comments on commit 91c1210

Please sign in to comment.