import React, { ReactElement } from "react"; import { Pressable, StyleSheet, ViewStyle, StyleProp } from "react-native"; interface SecondaryButtonProps { title: ReactElement; extendedStyle?: StyleProp; onPress: () => void; } const SecondaryButton: React.FC = ({ title, extendedStyle, onPress }) => { return ( [styles.button, pressed ? styles.buttonPressed : null, extendedStyle]} > {title} ); }; const styles = StyleSheet.create({ button: { maxWidth: "100%", padding: 15, backgroundColor: "#e7f2f8", justifyContent: "center", alignItems: "center", borderRadius: 10, }, buttonPressed: { backgroundColor: "#d0e1e8", }, }); export default SecondaryButton;