mirror of
https://github.com/mudabbir-ahmad/Project-MAD-crudler.git
synced 2026-10-07 20:40:20 +00:00
Module View added, with images and moved view into reusable component for ModuleView. All activities done for week 2.
This commit is contained in:
1 parent
c18a531a9c
commit
2eacee759a
11 files changed
+120
-74
No files matched your search
@@ -0,0 +1,42 @@
|
||||
import {StyleSheet, Text, View } from "react-native";
|
||||
import FullWidthImage from "react-native-fullwidth-image";
|
||||
|
||||
const ModuleView = ({module}) => {
|
||||
// Initialisation -------------
|
||||
// State ----------------------
|
||||
// Handlers -------------------
|
||||
// View -----------------------
|
||||
|
||||
return (<View style={styles.container}>
|
||||
<FullWidthImage source={{uri: module.ModuleImage}} style={styles.image}/>
|
||||
|
||||
<View style={styles.infoTray}>
|
||||
<Text style={styles.boldText}>View {module.ModuleCode} {module.ModuleName}</Text>
|
||||
<Text style={styles.text}>Level {module.ModuleLevel}</Text>
|
||||
<Text style={styles.Text}>
|
||||
{module.ModuleLeaderName} <Text style={styles.dimText}>(Module Leader)</Text>
|
||||
</Text>
|
||||
|
||||
</View>
|
||||
</View>);
|
||||
};
|
||||
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
gap: 15,
|
||||
}, infoTray: {
|
||||
gap: 5,
|
||||
}, image: {
|
||||
borderRadius: 3,
|
||||
}, text: {
|
||||
fontSize: 16,
|
||||
}, boldText: {
|
||||
fontSize: 16, fontWeight: 'bold',
|
||||
}, dimText: {
|
||||
color: "grey",
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
export default ModuleView;
|
||||
Reference in new issue
Block a user