Fakultas Ilmu Komputer UI

Commit 40ba293b authored by angelin depthios's avatar angelin depthios Committed by Bagus Prabowo
Browse files

FEAT: create Plain button component

parent 3b17148f
import { MaterialIcons } from "@expo/vector-icons";
import React from "react";
import { Text, StyleSheet, TouchableOpacity, View } from "react-native";
import Colors from "../../constants/Colors";
type props = {
text: string;
onPress: () => void;
};
const PlainButton = ({ text, onPress }: props) => {
return (
<View>
<TouchableOpacity style={styles.button} onPress={() => onPress()}>
<View style={styles.textContainter}>
<Text style={styles.texts}>{text}</Text>
</View>
<View style={styles.iconContainer}>
<MaterialIcons
style={{
justifyContent: "center",
}}
name="keyboard-arrow-right"
size={24}
color="#666666"
/>
</View>
</TouchableOpacity>
</View>
);
};
export default PlainButton;
const styles = StyleSheet.create({
button: {
width: 363,
borderRadius: 8,
elevation: 4,
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
backgroundColor: Colors.background,
},
textContainter: {
flex: 1,
marginRight: 25,
marginLeft: 8,
marginVertical: 8,
},
iconContainer: {
marginRight: 16,
marginVertical: 23,
},
texts: {
fontWeight: "300",
width: 307,
fontSize: 16,
textAlign: "left",
textAlignVertical: "center",
color: "#666666",
},
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment