We have a sick button component now

This commit is contained in:
2024-10-08 19:40:36 -05:00
parent 3d79e24ffb
commit 8128194488
8 changed files with 83 additions and 62 deletions

View File

@ -1,17 +1,35 @@
import { StyleSheet } from "react-native";
import { ThemedText } from "@/components/ThemedText";
import { ThemedView } from "@/components/ThemedView";
import { Colors } from '@/constants/Colors';
import { useColorScheme } from '@/hooks/useColorScheme';
import FontAwesome from "@expo/vector-icons/FontAwesome";
import Button from "@/components/buttons/Button";
const Index = () => {
const scheme = useColorScheme() ?? 'light';
return (
<ThemedView style={styles.container}>
<ThemedText style={styles.text}>
Home Screen
</ThemedText>
<ThemedView style={styles.footerContainer}>
<Button label="Choose a photo" />
<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>
</ThemedView>
);
@ -31,4 +49,10 @@ const styles = StyleSheet.create({
flex: 1 / 3,
alignItems: 'center',
},
buttonLabel: {
fontSize: 16,
},
buttonIcon: {
paddingRight: 8,
},
});