import * as React from 'react'; import {StyleSheet, Text, TouchableOpacity} from 'react-native'; import {Image, View} from 'react-native-animatable'; import CloseIcon from '../../assets/ionicons/close-outline.svg'; import {normalize, SCREEN_HEIGHT} from '../../utils'; type TaggPromptProps = { messageHeader: string; messageBody: string | Element; logoType: 'plus' | 'tagg'; hideCloseButton?: boolean; noPadding?: boolean; onClose: () => void; }; const TaggPrompt: React.FC = ({ messageHeader, messageBody, logoType, hideCloseButton, noPadding, onClose, }) => { /** * Generic prompt for Tagg */ const logo = () => { switch (logoType) { case 'plus': return require('../../assets/icons/plus-logo.png'); case 'tagg': default: return require('../../assets/images/logo-purple.png'); } }; return ( {messageHeader} {messageBody} {!hideCloseButton && ( { onClose(); }}> )} ); }; const styles = StyleSheet.create({ container: { flexDirection: 'column', justifyContent: 'center', alignItems: 'center', backgroundColor: 'white', height: SCREEN_HEIGHT / 4.5, }, closeButton: { position: 'relative', height: '40%', bottom: SCREEN_HEIGHT / 6, aspectRatio: 1, alignSelf: 'flex-end', }, icon: { width: normalize(40), height: normalize(40), }, header: { color: 'black', fontSize: normalize(16), fontWeight: '600', textAlign: 'center', marginTop: '2%', }, subtext: { color: 'gray', fontSize: normalize(12), fontWeight: '500', lineHeight: normalize(20), textAlign: 'center', marginTop: '2%', width: '95%', }, }); export default TaggPrompt;