Skip to content

Commit

Permalink
Allow specification of extra style attribute for Collapsible
Browse files Browse the repository at this point in the history
  • Loading branch information
freakinruben committed Apr 4, 2016
1 parent f5443ee commit 3d07def
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Collapsible.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var Collapsible = React.createClass({
React.PropTypes.string,
React.PropTypes.func
]),
style: View.propTypes.style,
},

getDefaultProps() : Object {
Expand Down Expand Up @@ -117,7 +118,7 @@ var Collapsible = React.createClass({
}];
}
return (
<Animated.View style={style} pointerEvents={this.props.collapsed ? 'none' : 'auto'}>
<Animated.View style={[this.props.style, style]} pointerEvents={this.props.collapsed ? 'none' : 'auto'}>
<Animated.View style={contentStyle} onLayout={this.state.animating ? undefined : this._handleLayoutChange}>
{this.props.children}
</Animated.View>
Expand Down

0 comments on commit 3d07def

Please sign in to comment.