import { ActivityIndicator, Text, TouchableOpacity, StyleSheet, View, ViewStyle } from "react-native"; import React, { FunctionComponent } from "react"; import { colors } from "../styles/palette"; const styles = StyleSheet.create({ button: { minHeight: 48, borderRadius: 4, backgroundColor: colors.primary, justifyContent: "center", alignItems: "center" }, text: { color: colors.textInverted, fontSize: 18 } }); export type PrimaryButtonProps = { onPress: () => void; loading: boolean; style: ViewStyle; disabled: boolean; }; export const PrimaryButton: FunctionComponent = ({ onPress, loading, style, disabled, children }) => { return ( {loading ? ( ) : ( {children} )} ); };