aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile/UniversityIcon.tsx
diff options
context:
space:
mode:
authorankit-thanekar007 <ankit.thanekar007@gmail.com>2021-04-21 16:42:34 -0700
committerankit-thanekar007 <ankit.thanekar007@gmail.com>2021-04-22 15:56:43 -0700
commitaf7c3d686149f32128d251c6d2fab3d82fb89ac4 (patch)
treeaf6142fabbfb806176a5840ec0d0496b6aed15ac /src/components/profile/UniversityIcon.tsx
parent3993175a466d4273373591a765bfc2f6a6e89ef4 (diff)
Badge view changes
Diffstat (limited to 'src/components/profile/UniversityIcon.tsx')
-rw-r--r--src/components/profile/UniversityIcon.tsx23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/components/profile/UniversityIcon.tsx b/src/components/profile/UniversityIcon.tsx
index 4cb1abe6..f1451f83 100644
--- a/src/components/profile/UniversityIcon.tsx
+++ b/src/components/profile/UniversityIcon.tsx
@@ -8,6 +8,7 @@ export interface UniversityIconProps extends ViewProps {
university: UniversityType;
university_class?: number;
imageStyle?: StyleProp<ImageStyle>;
+ needsShadow?: boolean;
}
/**
@@ -18,13 +19,16 @@ const UniversityIcon: React.FC<UniversityIconProps> = ({
university,
university_class,
imageStyle,
+ needsShadow = false,
}) => {
return (
<View style={[styles.container, style]}>
- <Image
- source={getUniversityBadge(university, 'Crest')}
- style={[styles.icon, imageStyle]}
- />
+ <View style={needsShadow && styles.shadowStyle}>
+ <Image
+ source={getUniversityBadge(university, 'Crest')}
+ style={[styles.icon, imageStyle]}
+ />
+ </View>
{university_class && (
<Text style={styles.univClass}>
{getUniversityClass(university_class)}
@@ -50,6 +54,17 @@ const styles = StyleSheet.create({
width: normalize(17),
height: normalize(19),
},
+ shadowStyle: {
+ padding: 5,
+ borderRadius: 30,
+ shadowOffset: {
+ width: 1,
+ height: 1,
+ },
+ shadowOpacity: 1,
+ shadowRadius: 3,
+ backgroundColor: 'white',
+ },
});
export default UniversityIcon;