1import { StyleSheet, View, Pressable, Text } from 'react-native'; 2import FontAwesome from '@expo/vector-icons/FontAwesome'; 3 4export default function Button({ label, theme }) { 5 if (theme === "primary") { 6 return ( 7 <View 8 style={[ 9 styles.buttonContainer, 10 { borderWidth: 4, borderColor: '#ffd33d', borderRadius: 18 }, 11 ]}> 12 <Pressable 13 style={[styles.button, { backgroundColor: '#fff' }]} 14 onPress={() => alert('You pressed a button.')}> 15 <FontAwesome name="picture-o" size={18} color="#25292e" style={styles.buttonIcon} /> 16 <Text style={[styles.buttonLabel, { color: '#25292e' }]}>{label}</Text> 17 </Pressable> 18 </View> 19 ); 20 } 21 22 return ( 23 <View style={styles.buttonContainer}> 24 <Pressable style={styles.button} onPress={() => alert('You pressed a button.')}> 25 <Text style={styles.buttonLabel}>{label}</Text> 26 </Pressable> 27 </View> 28 ); 29} 30 31const styles = StyleSheet.create({ 32 buttonContainer: { 33 width: 320, 34 height: 68, 35 marginHorizontal: 20, 36 alignItems: 'center', 37 justifyContent: 'center', 38 padding: 3, 39 }, 40 button: { 41 borderRadius: 10, 42 width: '100%', 43 height: '100%', 44 alignItems: 'center', 45 justifyContent: 'center', 46 flexDirection: 'row', 47 }, 48 buttonIcon: { 49 paddingRight: 8, 50 }, 51 buttonLabel: { 52 color: '#fff', 53 fontSize: 16, 54 }, 55}); 56