UNPKG

@uiw/react-native

Version:
41 lines 1.08 kB
import React from 'react'; import { View, StyleSheet, Text, TouchableHighlight } from 'react-native'; const Control = props => { const { onConfirm, onClosed, okText, cancelText, underlayColor } = props; return <View style={styles.container}> <TouchableHighlight style={styles.touchStyle} onPress={onClosed} underlayColor={underlayColor}> <Text style={styles.textStyle}>{cancelText}</Text> </TouchableHighlight> <TouchableHighlight style={styles.touchStyle} onPress={onConfirm} underlayColor={underlayColor}> <Text style={styles.textStyle}>{okText}</Text> </TouchableHighlight> </View>; }; const styles = StyleSheet.create({ container: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', height: 50, paddingVertical: 0, paddingHorizontal: 0 }, touchStyle: { paddingHorizontal: 25, borderRadius: 5, paddingVertical: 0, height: 50 }, textStyle: { color: '#1677ff', fontSize: 18, lineHeight: 50 } }); export default Control;