aboutsummaryrefslogtreecommitdiff
path: root/src/components/common/TaggPrompt.tsx
blob: 5cd3ac3f75cd65a4af802e4d49c085e1564c7d6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import * as React from 'react';
import {Platform, Text, StyleSheet, TouchableOpacity} from 'react-native';
import {Image, View} from 'react-native-animatable';
import {SCREEN_HEIGHT} from '../../utils';
import CloseIcon from '../../assets/ionicons/close-outline.svg';

type TaggPromptProps = {
  messageHeader: string;
  messageBody: string;
  logoType: string;
  onClose: () => void;
};

const TaggPrompt: React.FC<TaggPromptProps> = ({
  messageHeader,
  messageBody,
  logoType,
  onClose,
}) => {
  /**
   * Generic prompt for Tagg
   */

  return (
    <View style={styles.container}>
      <Image
        style={styles.icon}
        source={require('../../assets/icons/plus-logo.png')}
      />
      <Text style={styles.header}>{messageHeader}</Text>
      <Text style={styles.subtext}>{messageBody}</Text>
      <TouchableOpacity
        style={styles.closeButton}
        onPress={() => {
          onClose();
        }}>
        <CloseIcon height={'50%'} width={'50%'} color="gray" />
      </TouchableOpacity>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flexDirection: 'column',
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: 'white',
    height: SCREEN_HEIGHT / 4.5,
    paddingTop: SCREEN_HEIGHT / 10,
    paddingBottom: SCREEN_HEIGHT / 50,
  },
  closeButton: {
    position: 'relative',
    height: '40%',
    bottom: SCREEN_HEIGHT / 6,
    aspectRatio: 1,
    alignSelf: 'flex-end',
  },
  icon: {
    width: 40,
    height: 40,
  },
  header: {
    color: 'black',
    fontSize: 16,
    fontWeight: '600',
    textAlign: 'center',
    marginTop: '2%',
  },
  subtext: {
    color: 'gray',
    fontSize: 12,
    fontWeight: '500',
    textAlign: 'center',
    marginTop: '2%',
  },
});
export default TaggPrompt;