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