-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d7dc48
commit 290ce4c
Showing
1 changed file
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
import React from "react"; | ||
import { | ||
View, | ||
Text, | ||
StyleSheet, | ||
Image, | ||
Pressable, | ||
Linking, | ||
} from "react-native"; | ||
|
||
export default function WebsiteComponent() { | ||
const openLink = (url) => { | ||
Linking.openURL(url); | ||
}; | ||
|
||
return ( | ||
<View> | ||
<Text style={styles.header}>Websites</Text> | ||
<View style={styles.cardContainer}> | ||
<Pressable | ||
style={[styles.card, styles.first]} | ||
onPress={() => openLink("https://eternityband.org/")} | ||
> | ||
<Image | ||
style={styles.icon} | ||
source={require("./../assets/eternity-band.png")} | ||
/> | ||
<Text style={styles.text}>Eternity Band</Text> | ||
<Image | ||
style={styles.arrow} | ||
source={require("./../assets/external-link.png")} | ||
/> | ||
</Pressable> | ||
<View style={styles.divider} /> | ||
<Pressable | ||
style={styles.card} | ||
onPress={() => openLink("https://goaudacity.com/")} | ||
> | ||
<Image | ||
style={styles.icon} | ||
source={require("./../assets/audacity-workshop.png")} | ||
/> | ||
<Text style={styles.text}>Audacity Workshop</Text> | ||
<Image | ||
style={styles.arrow} | ||
source={require("./../assets/external-link.png")} | ||
/> | ||
</Pressable> | ||
<View style={styles.divider} /> | ||
<Pressable | ||
style={styles.card} | ||
onPress={() => openLink("https://funyouth.us/")} | ||
> | ||
<Image | ||
style={styles.icon} | ||
source={require("./../assets/colorvision.png")} | ||
/> | ||
<Text style={styles.text}>ColorVision</Text> | ||
<Image | ||
style={styles.arrow} | ||
source={require("./../assets/external-link.png")} | ||
/> | ||
</Pressable> | ||
<View style={styles.divider} /> | ||
<Pressable | ||
style={[styles.card, styles.last]} | ||
onPress={() => openLink("https://funyouth.us/art")} | ||
> | ||
<Image | ||
style={styles.icon} | ||
source={require("./../assets/fun-youth.png")} | ||
/> | ||
<Text style={styles.text}>FUN Youth</Text> | ||
<Image | ||
style={styles.arrow} | ||
source={require("./../assets/external-link.png")} | ||
/> | ||
</Pressable> | ||
</View> | ||
</View> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
header: { | ||
fontSize: 16, | ||
fontWeight: "bold", | ||
marginBottom: 10, | ||
paddingHorizontal: 10, | ||
}, | ||
cardContainer: { | ||
backgroundColor: "#f5f5f5", | ||
borderRadius: 10, | ||
}, | ||
card: { | ||
flexDirection: "row", | ||
alignItems: "center", | ||
padding: 10, | ||
borderColor: "#e0e0e0", | ||
borderWidth: 1, | ||
}, | ||
first: { | ||
borderTopLeftRadius: 10, | ||
borderTopRightRadius: 10, | ||
}, | ||
last: { | ||
borderBottomLeftRadius: 10, | ||
borderBottomRightRadius: 10, | ||
}, | ||
icon: { | ||
width: 20, | ||
height: 20, | ||
marginRight: 10, | ||
}, | ||
text: { | ||
flex: 1, | ||
fontSize: 14, | ||
color: "#555", | ||
}, | ||
arrow: { | ||
width: 20, | ||
height: 20, | ||
}, | ||
divider: { | ||
height: 1, | ||
backgroundColor: "#e0e0e0", | ||
}, | ||
}); |