import * as React from "react"; import { useCallback } from "react"; import { Text, TouchableOpacity, View } from "react-native"; import { style } from "./style"; export const LoginWithButton = ({ children, onPress, backgroundColor = "#fff", color = "#222", icon, }: { children: React.ReactNode; onPress: () => any; backgroundColor?: string; color?: string; icon?: React.ReactNode; }) => { const onButtonPress = useCallback(() => onPress && onPress(), [onPress]); return ( {icon && ( {icon} )} {children} ); };