import React, { FunctionComponent } from 'react'; import { ImageSourcePropType, ImageStyle, TextStyle, ViewStyle, ActivityIndicator } from 'react-native'; import { TouchableOpacity } from 'react-native-gesture-handler'; import { useTheme } from 'styled-components/native'; import { OButton, OIcon, OText } from '../shared'; import { Container, InnerContainer, ActivityIndicatorContainer } from './styles'; const OptionCard = (props: Props) => { const theme = useTheme(); return ( {props.isLoading && ( )} {props.icon && ( )} {props.VectorIcon && ( )} {props.title} {props.description} ); } interface Props { title: string; titleStyle?: TextStyle; description: string; descriptionStyle?: TextStyle; isDisabled?: boolean; isLoading?: boolean; onClick?: () => void; style?: ViewStyle; bgImage: ImageSourcePropType; innerStyle?: ViewStyle; icon: ImageSourcePropType; iconStyle?: ImageStyle; callToActionText: string; callToActionTextStyle?: TextStyle; callToActionIcon?: ImageSourcePropType; callToActionIconStyle?: ImageStyle; VectorIcon?: FunctionComponent; } export default OptionCard;