aboutsummaryrefslogtreecommitdiff
path: root/src/components/onboarding/TaggDropDown.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/onboarding/TaggDropDown.tsx')
-rw-r--r--src/components/onboarding/TaggDropDown.tsx40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/components/onboarding/TaggDropDown.tsx b/src/components/onboarding/TaggDropDown.tsx
new file mode 100644
index 00000000..a45426ca
--- /dev/null
+++ b/src/components/onboarding/TaggDropDown.tsx
@@ -0,0 +1,40 @@
+import React from 'react';
+import RNSelectPicker from 'react-native-picker-select';
+import {View, StyleSheet, TextInputProps} from 'react-native';
+
+interface TaggDropDownProps extends TextInputProps {
+ width?: number | string;
+}
+
+/**
+ * An input component that receives all props a normal TextInput component does. TaggInput components grow to 60% of their parent's width by default, but this can be set using the `width` prop.
+ */
+const TaggDropDown = React.forwardRef((props: TaggDropDownProps, ref: any) => {
+ return (
+ <View style={styles.container}>
+ <RNSelectPicker {...props} style={styles} ref={ref} />
+ </View>
+ );
+});
+
+const styles = StyleSheet.create({
+ container: {
+ width: '66.67%',
+ alignItems: 'center',
+ marginVertical: 11,
+ },
+ inputIOS: {
+ paddingVertical: 8,
+ paddingHorizontal: 10,
+ minWidth: '60%',
+ fontSize: 16,
+ fontWeight: '600',
+ color: '#fff',
+ borderColor: '#fffdfd',
+ borderWidth: 2,
+ borderRadius: 20,
+ paddingLeft: 13,
+ },
+});
+
+export default TaggDropDown;