Wavelength/app/(tabs)/index.tsx

59 lines
1.4 KiB
TypeScript
Raw Normal View History

2024-10-08 16:58:50 -05:00
import { StyleSheet } from "react-native";
import { ThemedText } from "@/components/ThemedText";
import { ThemedView } from "@/components/ThemedView";
2024-10-08 19:40:36 -05:00
import { Colors } from '@/constants/Colors';
import { useColorScheme } from '@/hooks/useColorScheme';
import FontAwesome from "@expo/vector-icons/FontAwesome";
2024-10-08 16:58:50 -05:00
import Button from "@/components/buttons/Button";
2024-10-08 16:58:50 -05:00
const Index = () => {
2024-10-08 19:40:36 -05:00
const scheme = useColorScheme() ?? 'light';
return (
2024-10-08 16:58:50 -05:00
<ThemedView style={styles.container}>
<ThemedText style={styles.text}>
Home Screen
</ThemedText>
<ThemedView style={styles.footerContainer}>
2024-10-08 19:40:36 -05:00
<Button width={220} height={60}
onPress={() => alert('You pressed a button.')}
>
<FontAwesome name="picture-o" size={18}
color='#25292e' style={styles.buttonIcon}
/>
<ThemedText
style={[
styles.buttonLabel,
{color: Colors[scheme].background}
]}
>
Press this button
</ThemedText>
</Button>
</ThemedView>
2024-10-08 16:58:50 -05:00
</ThemedView>
);
}
2024-10-08 16:58:50 -05:00
export default Index;
const styles = StyleSheet.create({
2024-10-08 16:58:50 -05:00
container: {
flex: 1,
alignItems: 'center',
2024-10-08 16:58:50 -05:00
justifyContent: 'center',
},
2024-10-08 16:58:50 -05:00
text: {
fontSize: 24,
},
2024-10-08 16:58:50 -05:00
footerContainer: {
flex: 1 / 3,
alignItems: 'center',
},
2024-10-08 19:40:36 -05:00
buttonLabel: {
fontSize: 16,
},
buttonIcon: {
paddingRight: 8,
},
});