You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

52 lines
1.4 KiB

import React from "react"
import { View, Text, TouchableOpacity, StyleSheet } from "react-native"
import { colors, texts } from "../components/Variables"
const styles = StyleSheet.create({
row: {
paddingHorizontal: 15,
paddingVertical: 20,
backgroundColor: colors.blue,
marginBottom: 1
},
container: {
paddingHorizontal: 20
},
button: {
backgroundColor: colors.white_alpha,
borderWidth: 4,
borderColor: 'transparent',
borderRadius: 10,
paddingHorizontal: 10,
paddingVertical: 13,
alignItems: "center",
justifyContent: "center",
width: "100%",
marginVertical: 5
},
text: {
fontSize: 20,
color: colors.white,
fontWeight: "500",
textShadowColor: 'rgba(0, 0, 0, 0.45)',
textShadowOffset: {width: -1, height: 1},
textShadowRadius: 2
},
subtitle: {
fontSize: 14,
color: colors.white,
fontWeight: "400",
textShadowColor: 'rgba(0, 0, 0, 0.45)',
textShadowOffset: {width: -1, height: 1},
textShadowRadius: 2
}
})
export const RowItem = ({ onPress = () => {}, name, subtitle, textColor }) => (
<TouchableOpacity style={styles.container} onPress={onPress} activeOpacity={0.8}>
<View style={styles.button}>
<Text style={[styles.text, { color: textColor }]}>{name}</Text>
<Text style={[styles.subtitle, { color: textColor }]}>({subtitle} {texts.questions})</Text>
</View>
</TouchableOpacity>
)