button.tsx
// // components/CustomButton.tsx
// import React from "react";
// import { TouchableOpacity, Text, StyleSheet, GestureResponderEvent, ViewStyle, TextStyle } from "react-native";
// interface CustomButtonProps {
// title: string; // Button text
// onPress: (event: GestureResponderEvent) => void; // Function to handle button press
// buttonStyle?: ViewStyle; // Optional custom styles for the button
// textStyle?: TextStyle; // Optional custom styles for the text
// }
// const CustomButton: React.FC<CustomButtonProps> = ({ title, onPress, buttonStyle, textStyle }) => {
// return (
// <TouchableOpacity style={[styles.button, buttonStyle]} onPress={onPress}>
// <Text style={[styles.text, textStyle]}>{title}</Text>
// </TouchableOpacity>
// );
// };
// const styles = StyleSheet.create({
// button: {
// backgroundColor: "#007BFF",
// paddingVertical: 12,
// paddingHorizontal: 20,
// borderRadius: 8,
// alignItems: "center",
// justifyContent: "center",
// },
// text: {
// color: "#fff",
// fontSize: 16,
// fontWeight: "600",
// },
// });
// export default CustomButton;
Comments
Post a Comment