aboutsummaryrefslogtreecommitdiff
path: root/src/components/onboarding/SubmitButton.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/onboarding/SubmitButton.tsx')
-rw-r--r--src/components/onboarding/SubmitButton.tsx50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/components/onboarding/SubmitButton.tsx b/src/components/onboarding/SubmitButton.tsx
new file mode 100644
index 00000000..f946d390
--- /dev/null
+++ b/src/components/onboarding/SubmitButton.tsx
@@ -0,0 +1,50 @@
+import React from 'react';
+import {
+ TouchableOpacity,
+ TouchableOpacityProps,
+ Text,
+ StyleSheet,
+ View,
+} from 'react-native';
+
+interface SubmitButtonProps extends TouchableOpacityProps {
+ text: string;
+ color: string;
+}
+
+/*
+ * A button component that creates a TouchableOpacity in the style of our onboarding buttons. It takes in props to define the text in the TouchableOpacity as well as the background color.
+*/
+const SubmitButton: React.FC<SubmitButtonProps> = (
+ props: SubmitButtonProps,
+) => {
+ return (
+ <View {...props}>
+ <TouchableOpacity
+ style={[
+ styles.button,
+ {backgroundColor: props.color},
+ ]}
+ >
+ <Text style={styles.text}>{props.text}</Text>
+ </TouchableOpacity>
+ </View>
+ );
+};
+
+const styles = StyleSheet.create({
+ button: {
+ width: 144,
+ height: 36,
+ justifyContent: 'center',
+ alignItems: 'center',
+ borderRadius: 18,
+ },
+ text: {
+ fontSize: 16,
+ color: '#78a0ef',
+ fontWeight: 'bold',
+ },
+});
+
+export default SubmitButton;