Skip to content

Commit

Permalink
Feature parameter floatBack (#2848)
Browse files Browse the repository at this point in the history
  • Loading branch information
williampaulo authored and sankhadeeproy007 committed Aug 12, 2019
1 parent e265ac2 commit 339aa19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/basic/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ class Item extends Component {
};
}

floatBack() {
floatBack(e) {
Animated.timing(this.state.topAnim, {
toValue: 18,
toValue: e || 18,
duration: 150
}).start();
Animated.timing(this.state.opacAnim, {
Expand Down Expand Up @@ -386,7 +386,7 @@ class Item extends Component {
this.floatUp(-16);
} else {
newLabel.push(label);
this.floatBack();
this.floatBack(labelProps.floatBack);
}
} else {
newLabel.push(
Expand Down
3 changes: 2 additions & 1 deletion src/basic/Label.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Label.propTypes = {
PropTypes.object,
PropTypes.number,
PropTypes.array
])
]),
floatBack: PropTypes.number,
};

const StyledLabel = connectStyle('NativeBase.Label', {}, mapPropsToStyleNames)(
Expand Down

0 comments on commit 339aa19

Please sign in to comment.