-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathButton.js
More file actions
34 lines (31 loc) · 779 Bytes
/
Button.js
File metadata and controls
34 lines (31 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { Pressable, StyleSheet, Text, View } from "react-native";
import { MaterialCommunityIcons as Icon } from "@expo/vector-icons";
const styles = StyleSheet.create({
row: {
alignItems: "center",
flexDirection: "row",
marginVertical: 8
},
text: {
flex: 1,
fontFamily: "Lobster",
fontSize: 32,
textAlign: "auto"
}
});
const Button = ({ onPress, color, label, disabled = false }) => {
return (
<Pressable onPress={onPress} disabled={disabled}>
<View style={styles.row}>
<Icon
name={"hand-pointing-right"}
color={color}
size={32}
style={{ marginRight: 30 }}
/>
<Text style={styles.text}>{label}</Text>
</View>
</Pressable>
);
};
export default Button;