UNPKG

airbridge-react-native-sdk

Version:

Airbridge SDK for React Native

43 lines (37 loc) 972 B
import React, { Component } from 'react' import { TouchableOpacity, Pressable, View, Text } from 'react-native' import { Styles } from '../common/Styles' import { Colors } from '../common/Colors' export default class VerticalPreference extends Component{ constructor(props){ super(props) this.accessibilityLabel = Platform.OS !== 'ios' ? this.props.accessibilityLabel : null this.testID = this.props.accessibilityLabel } render() { return ( <Pressable onPress={this.props.onPress}> <Text style={{ color: Colors.black, fontSize: 16, fontWeight: 600 }}>{this.props.title}</Text> <Text testID={this.testID} accessibilityLabel={this.accessibilityLabel} style={{ color: Colors.black, fontSize: 12 }}>{this.props.text}</Text> <View style={Styles.line} /> </Pressable> ) } }