37 lines
827 B

import React from "react";
import { View, StyleSheet, Text, TouchableOpacity } from "react-native";
import colors from "../config/colors";
function AppButton({ title, onPress, color = colors.lightBlue, style }) {
return (
<View style={style}>
<TouchableOpacity
style={[styles.button, { backgroundColor: color }]}
onPress={onPress}
>
<Text style={styles.text}>{title}</Text>
</TouchableOpacity>
</View>
);
}
const styles = StyleSheet.create({
button: {
backgroundColor: colors.lightBlue,
borderRadius: 20,
justifyContent: "center",
alignItems: "center",
width: "100%",
height: 48,
marginVertical: 10,
},
text: {
color: colors.white,
fontSize: 16,
textTransform: "uppercase",
fontWeight: "bold",
},
});
export default AppButton;