UNPKG

airbridge-react-native-sdk

Version:

Airbridge SDK for React Native

51 lines (47 loc) 1.15 kB
import React, { Component } from 'react' import { Pressable, Text } from 'react-native' export default class CustomButton extends Component{ constructor(props){ super(props) } render() { return ( <Pressable accessibilityLabel={this.props.accessibilityLabel} style={ { backgroundColor: this.props.buttonColor, flexDirection: 'row', alignItems: 'center', borderRadius: 8, paddingHorizontal: 16, marginVertical: 4, marginHorizontal: 0, height: this.props.height ?? 32 } } onPress={this.props.onPress}> <Text style={{ color: this.props.titleColor, flex: this.props.arrow ? 1 : 0, color: '#fff', fontSize: 14, } }>{this.props.title}</Text> {this.props.arrow == true && <Text style={{ color: this.props.titleColor, color: '#fff', fontSize: 14, } }>{'>'}</Text> } </Pressable> ) } }