A simple button for react native that doesn't have the double click problem
Works for react native + expo projects!
npm install react-native-internet-friends-button
import { Button } from "internet-friends-button";
// ...
return (
<View style={styles.container}>
<Button
text='Submit'
onPressButton={() => {
return new Promise((resolve):void => {
setTimeout(() => {
Alert.alert('fuk')
resolve('yet');
}, 1000)
})
}}
/>
</View>
text: string, // Button text
textColor?: string,
buttonColor?: string,
onPressButton: Function, // Pass in a function to run when the button is clicked
showShadow?: boolean, // Button shadow (try setting to false to see the difference)
style?: any // Inline style
onChangeText:any,
placeholder:string,
onSubmitEditing:any,
secureTextEntry?: boolean,
autoCorrect?: boolean,
maxLength?:number,
height?: string | number,
width?: string | number
To run example project:
yarn
yarn run example ios