forked from intercom/intercom-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInput.tsx
More file actions
29 lines (26 loc) · 676 Bytes
/
Copy pathInput.tsx
File metadata and controls
29 lines (26 loc) · 676 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
28
29
import type { TextInputProps } from 'react-native';
import React from 'react';
import { StyleSheet, View, TextInput, Text } from 'react-native';
const Input = ({
title,
style,
...props
}: TextInputProps & { title: string }) => {
return (
<View style={styles.buttonContainer}>
{title && <Text style={styles.title}>{title}</Text>}
<TextInput {...props} style={[styles.input, style]} />
</View>
);
};
const styles = StyleSheet.create({
buttonContainer: { marginVertical: 8 },
title: { marginBottom: 3 },
input: {
borderWidth: 1,
borderColor: 'black',
paddingHorizontal: 8,
paddingVertical: 4,
},
});
export default Input;