-1
I have a project in reactNative that has an Input at the top and right of that input I have a magnifying glass icon but when I write to that icon, the text is behind the icon, as I do for when the text reaches a 10px distance from the icon it starts to push the text backwards?
Code
import React from 'react';
import { View, TextInput, StyleSheet, Image, Text, FlatList } from 'react-native';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { faSearch } from '@fortawesome/free-solid-svg-icons';
export default function Region(){
return(
    <View style={style.mainBox}>
        <View style={style.searchBox}>
            <TextInput style={style.searchInput} placeholder="Pesquise um estabelecimento" />
            <FontAwesomeIcon size={22} style={style.searchImg} icon={ faSearch } />
        </View>
    </View>
 );
}
const style = StyleSheet.create({
mainBox:{
    flex: 1,
},
searchImg: {
    marginTop: 18,
    position: 'absolute',
    right: 16,
    color: '#ccc',
},
searchBox: {
    alignContent: 'center',
    alignItems: 'center',
},
searchInput: {
    backgroundColor: '#FFF',
    width: '97%',
    borderColor: '#CCC',
    borderWidth: 1,
    marginTop: 5,
    borderRadius: 5,
    padding: 10
}
});
