1.0.2 • Published 4 years ago

react-native-assitive-touch v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

React Native AssitiveTouch Component Like IPhone

GitHub : https://github.com/ilkerkesici/react-native-assitive-touch

:star: ScreenShot

npm.io

:arrow_down: Installation

Install from npm

npm install --save react-native-assitive-touch

or

yarn add react-native-assitive-touch

Import AssitiveTouch (Step 2)

import AssitiveTouch from "react-native-assitive-touch";

AssitiveTouch component must wrap your app (Step 3)

const App = () => {
  return (
    <AssitiveTouch
      onPress={() => console.log('Assitive Button is clicked!')}
      >                  
      <View style={{flex: 1, alignSelf: 'stretch'}}>
        {/* Your App */}                 # Your app other components here
      </View>
    </AssitiveTouch>
  );
};

Config

ParamsTypeDefaultDescription
sizeNumber70Size of the button
buttonReactNode-Your custom button component (equal or smaller than size)
colorString#212121Button color
percentageFloat0.2Percantage of vertical swipe field

Methods

NameDescription
onPressRun on press the default assitive touch button
onMoveEndRun at the end of the assistive touch move

:warning: Dependency

Note on the legacy CLI

There seems to be quite some confusion about the legacy CLI. This template only works with the new CLI. Make sure you have uninstalled the legacy react-native-cli first (npm uninstall -g react-native-cli), for the below command to work. If you wish to not use npx, you can also install the new CLI globally (npm i -g @react-native-community/cli or yarn global add @react-native-community/cli).