Browse Source

upload button

mortimel.ojeda 2 years ago
parent
commit
568d6aec43
1 changed files with 15 additions and 0 deletions
  1. 15
    0
      CustomButton.js

+ 15
- 0
CustomButton.js View File

@@ -0,0 +1,15 @@
1
+import React from 'react';
2
+import { Text, TouchableOpacity } from 'react-native';
3
+
4
+import { styles } from '../config/styles';
5
+import colors from '../config/colors';
6
+
7
+function CustomButton( {title, onPress, color = "skyblue", marginTop} ) {
8
+    return (
9
+        <TouchableOpacity style={[styles.regbutton, { backgroundColor: colors[color] }, { marginTop: marginTop }]} onPress={onPress}>
10
+            <Text style={styles.regbuttontext}>{title}</Text>
11
+        </TouchableOpacity>
12
+    );
13
+}
14
+
15
+export default CustomButton;