Skip to content

Instantly share code, notes, and snippets.

@alic-xc
Created December 19, 2023 17:35
Show Gist options
  • Save alic-xc/8e0d486796d697b716f3b92c2f6bda53 to your computer and use it in GitHub Desktop.
Save alic-xc/8e0d486796d697b716f3b92c2f6bda53 to your computer and use it in GitHub Desktop.
import { Text, StyleSheet, TouchableOpacity } from "react-native";
import React from "react";
interface ButtonProps {
title: string;
}
const Button = (props: ButtonProps) => {
return (
<TouchableOpacity style={style.buttonContainer}>
<Text style={style.button}>{props.title}</Text>
</TouchableOpacity>
);
};
const style = StyleSheet.create({
buttonContainer: {
backgroundColor: "#0F6CBD",
padding: 10,
borderRadius: 5,
},
button: {
textAlign: "center",
fontSize: 15,
fontWeight: "bold",
color: "white",
},
});
export default Button;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment