Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit 027b38f

Browse files
Neitschwhichsteveyp
authored andcommitted
[added] wrapperProps and wrapperStyle props
[added] wrapperProps and wrapperStyle props * Fixed order of props * Fixed whitespace noise * Fixed whitespace
1 parent 6c7a7cf commit 027b38f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/Autocomplete.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@ let Autocomplete = React.createClass({
1414
renderItem: React.PropTypes.func.isRequired,
1515
menuStyle: React.PropTypes.object,
1616
inputProps: React.PropTypes.object,
17-
labelText: React.PropTypes.string
17+
labelText: React.PropTypes.string,
18+
wrapperProps: React.PropTypes.object,
19+
wrapperStyle: React.PropTypes.object
1820
},
1921

2022
getDefaultProps () {
2123
return {
2224
value: '',
25+
wrapperProps: {},
26+
wrapperStyle: {
27+
display: 'inline-block'
28+
},
2329
inputProps: {},
2430
labelText: '',
2531
onChange () {},
@@ -298,8 +304,8 @@ let Autocomplete = React.createClass({
298304
state: this.state
299305
})
300306
}
301-
return (
302-
<div style={{display: 'inline-block'}}>
307+
return (
308+
<div style={{...this.props.wrapperStyle}} {...this.props.wrapperProps}>
303309
<label htmlFor={this.id} ref="label">
304310
{this.props.labelText}
305311
</label>

0 commit comments

Comments
 (0)