-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextInputComponent.jsx
More file actions
27 lines (25 loc) · 876 Bytes
/
Copy pathTextInputComponent.jsx
File metadata and controls
27 lines (25 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { View, Text, TextInput } from 'react-native';
import React from 'react';
import Colors from '../../constants/Colors';
export default function TextInputComponent({ userInputValue }) {
return (
<View>
<Text style={{ marginTop: 10 }}>Enter your prompt</Text>
<TextInput
placeholder="Enter your prompt here..."
numberOfLines={5}
multiline={true}
textAlignVertical="top"
onChangeText={(value) => userInputValue(value)} // ✅ Prevent errors if prop is missing
style={{
padding: 15,
backgroundColor: Colors.LIGHT_GRAY || 'lightgray', // ✅ Fallback color
borderRadius: 15,
marginTop: 10,
borderWidth: 1, // ✅ Improved UI
borderColor: '#ccc', // ✅ Light border for visibility
}}
/>
</View>
);
}