0.2.0 • Published 2 years ago

react-native-internet-friends-button v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

internet-friends-button

A simple button for react native that doesn't have the double click problem

Simulator Screen Recording - iPhone 13 - 2022-07-28 at 14 20 22

Works for react native + expo projects!

Installation

npm install react-native-internet-friends-button

Usage

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>

Button props

  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

Input props

  onChangeText:any,
  placeholder:string,
  onSubmitEditing:any,
  secureTextEntry?: boolean,
  autoCorrect?: boolean,
  maxLength?:number,
  height?: string | number,
  width?: string | number

Contributing

To run example project:

yarn yarn run example ios