How to position text field above a button in react native

54 views Asked by At

I'd like to add a text entry field right above this button, but I'm not sure how to do it

const styles = StyleSheet.create({
  button: {
    marginTop: 400,
    justifyContent: 'center',
    alignItems: 'center'
  },
  textInput: {
    borderWidth: 2,
    borderRadius: 6,
    width: 100,
    alignItems: 'center',

  }
});

Image:

enter image description here

1

There are 1 answers

0
Maxwell On

You have 'marginTop: 400' on the button.