P
P
pcdesign2019-05-06 14:14:13
React Native
pcdesign, 2019-05-06 14:14:13

Is it possible to overlay a button with an icon on a textInput?

Here's a snack:
https://snack.expo.io/@aimodding/textplusbutt
At the moment, this is what happens:
5cd015a7b786e658994039.gif
I would like to come to this form:
5cd015bceab0a904318048.gif
PS: I found solutions on SO , but I don't really like them. And I would like to stay within the framework of react-native-paper

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Panteleev, 2019-05-09
@pcdesign

Improved your example a bit.

spoiler
const styles = StyleSheet.create({
  inputContainerStyle: {
    margin: 8,
    marginTop: 75,
    position: 'relative'
  },
  icon: {
    position: 'absolute',
    top: 5,
    right: 0,
    zIndex: 1
  }
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question