aboutsummaryrefslogtreecommitdiff
path: root/src/components/onboarding/ArrowButton.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/onboarding/ArrowButton.tsx')
-rw-r--r--src/components/onboarding/ArrowButton.tsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/components/onboarding/ArrowButton.tsx b/src/components/onboarding/ArrowButton.tsx
new file mode 100644
index 00000000..bf07c6ac
--- /dev/null
+++ b/src/components/onboarding/ArrowButton.tsx
@@ -0,0 +1,23 @@
+import React from 'react';
+import {Image, TouchableOpacity, TouchableOpacityProps} from 'react-native';
+
+interface ArrowButtonProps extends TouchableOpacityProps {
+ direction: 'forward' | 'backward';
+ disabled?: boolean;
+}
+const ArrowButton: React.FC<ArrowButtonProps> = (props: ArrowButtonProps) => {
+ const arrow =
+ props.direction === 'forward'
+ ? props.disabled
+ ? require('../../assets/images/arrow-forward-disabled.png')
+ : require('../../assets/images/arrow-forward-enabled.png')
+ : require('../../assets/images/arrow-backward.png');
+
+ return (
+ <TouchableOpacity {...props}>
+ <Image source={arrow} />
+ </TouchableOpacity>
+ );
+};
+
+export default ArrowButton;