From 55a1a9615720c1709d05b40e08c4f7fd4773fee3 Mon Sep 17 00:00:00 2001
From: Shravya Ramesh <shravs1208@gmail.com>
Date: Tue, 9 Mar 2021 12:23:44 -0800
Subject: Added new component for clicked

---
 .../suggestedPeople/UniversityIconClicked.tsx      | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 src/components/suggestedPeople/UniversityIconClicked.tsx

(limited to 'src/components/suggestedPeople/UniversityIconClicked.tsx')

diff --git a/src/components/suggestedPeople/UniversityIconClicked.tsx b/src/components/suggestedPeople/UniversityIconClicked.tsx
new file mode 100644
index 00000000..bde4e17f
--- /dev/null
+++ b/src/components/suggestedPeople/UniversityIconClicked.tsx
@@ -0,0 +1,61 @@
+import React from 'react';
+import {ImageStyle, StyleProp, StyleSheet, ViewProps} from 'react-native';
+import {Image, Text, View} from 'react-native-animatable';
+import {getUniversityClass, normalize} from '../../utils';
+
+export interface UniversityIconClickedProps extends ViewProps {
+  university: string;
+  university_class?: number;
+  imageStyle?: StyleProp<ImageStyle>;
+}
+
+/**
+ * Component to display university icon and class
+ */
+const UniversityIconClicked: React.FC<UniversityIconClickedProps> = ({
+  style,
+  university,
+  university_class,
+  imageStyle,
+}) => {
+  var universityIcon;
+  switch (university) {
+    case 'brown':
+      universityIcon = require('../../assets/universities/brown-clicked.png');
+      break;
+    default:
+      universityIcon = require('../../assets/universities/brown-clicked.png');
+      break;
+  }
+
+  return (
+    <View style={[styles.container, style]}>
+      <Image source={universityIcon} style={[styles.icon, imageStyle]} />
+      {university_class && (
+        <Text style={styles.univClass}>
+          {getUniversityClass(university_class)}
+        </Text>
+      )}
+    </View>
+  );
+};
+
+const styles = StyleSheet.create({
+  container: {
+    flexDirection: 'column',
+    flexWrap: 'wrap',
+    justifyContent: 'center',
+    alignItems: 'center',
+    height: '100%',
+  },
+  univClass: {
+    fontSize: normalize(14),
+    fontWeight: '500',
+  },
+  icon: {
+    width: normalize(17),
+    height: normalize(19),
+  },
+});
+
+export default UniversityIconClicked;
-- 
cgit v1.2.3-70-g09d2

