42 lines
		
	
	
		
			869 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			869 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import React, { FC } from "react";
 | |
| import {
 | |
|   Text,
 | |
|   TextStyle,
 | |
|   TouchableOpacity,
 | |
|   View,
 | |
|   ViewStyle,
 | |
| } from "react-native";
 | |
| 
 | |
| type Props = {
 | |
|   onPress: () => void;
 | |
|   string: string;
 | |
|   style?: ViewStyle;
 | |
|   tS?: TextStyle;
 | |
|   children?: any;
 | |
| };
 | |
| export const BigButton: FC<Props> = (props) => {
 | |
|   const { onPress, string, style, tS, children } = props;
 | |
|   return (
 | |
|     <TouchableOpacity
 | |
|       style={{
 | |
|         padding: 10,
 | |
|         flexDirection: "row",
 | |
|         borderColor: "white",
 | |
|         borderWidth: 1,
 | |
|         margin: 10,
 | |
|         borderRadius: 5,
 | |
|         alignItems: "center",
 | |
|         ...style,
 | |
|       }}
 | |
|       onPress={onPress}
 | |
|     >
 | |
|       <View style={{ flex: 1 }} />
 | |
|       {children}
 | |
|       <Text style={{ fontSize: 25, fontWeight: "bold", color: "white", ...tS }}>
 | |
|         {string}
 | |
|       </Text>
 | |
|       <View style={{ flex: 1 }} />
 | |
|     </TouchableOpacity>
 | |
|   );
 | |
| };
 |