1.0.0 • Published 7 years ago

rn-touchable-view v1.0.0

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

rn-touchable-view

React-native wrapper for Touchable components for use with appium. It appears that any components contained inside a touchable component are hidden within the heirarchy. By setting the appium prop to true, TouchableView uses an alternative method for registering touch events on the view that allows appium to have visibility of any children.

Setup

npm install --save rn-touchable-view

Props

PropType
appiumboolean(optional) enables visibility of children for use with appium
typestring(optional) type of Touchable component as a string default: TouchableHighlight

Usage

Import:

import TouchableView from 'rn-touchable-view';`

Example:

class Example extends Component {
  render() {
    return (
      <TouchableView onPress={() => console.log('Tapped!')} type={'TouchableHighlight'} appium={true}>
        <Text>Appium can see me!</Text>
      </TouchableView>
    );
  }
}