Skip to content

Commit

Permalink
Merge pull request #183 from dcangulo/bugfix/label-margin
Browse files Browse the repository at this point in the history
Fix label margin.
  • Loading branch information
hossein-zare authored Jan 27, 2021
2 parents 5ee1536 + 6ea4c02 commit 165671e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,13 @@ class DropDownPicker extends React.Component {
{this.state.choice.icon && ! multiple && this.state.choice.icon()}
<Text style={[
{ color: 'red' }, // default label color
this.props.labelStyle,
placeholderStyle, {opacity, flex: 1}, {
marginLeft: (this.props.labelStyle.hasOwnProperty('textAlign') && this.props.labelStyle.textAlign === 'left') || ! this.props.labelStyle.hasOwnProperty('textAlign') ? 5 : 0,
marginRight: (this.props.labelStyle.hasOwnProperty('textAlign') && this.props.labelStyle.textAlign === 'right') ? 5 : 0,
},
this.state.choice.label !== null && this.props.selectedLabelStyle,
this.state.choice.icon ?? {marginLeft: 5}
this.state.choice.icon ?? {marginLeft: 5},
this.props.labelStyle
]} {...this.props.labelProps}>
{multiple ? (
this.state.choice.length > 0 ? this.getNumberOfItems() : placeholder
Expand Down

0 comments on commit 165671e

Please sign in to comment.