@hitesh0009/react-native-basic-form 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Form.js +9 -8
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/Form.tsx +20 -16
- package/src/types.ts +1 -0
package/dist/Form.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { FlatList, Image, StyleSheet, Text, TextInput, TouchableOpacity, View, } from "react-native";
|
|
2
|
-
export const Form = ({ data, gap_bwt_keyValue = 10, gap_bwt_keys = 12, lableStyle, inputTextStyle, buttonContainerStyle, buttonTextStyle, headerIcon, headerIconStyle, headerTextStyle, imageProps, flatlistProps, textInputProps, textProp, headerText, headerContainerStyle, containerStyle, }) => {
|
|
2
|
+
export const Form = ({ data, gap_bwt_keyValue = 10, gap_bwt_keys = 12, lableStyle, inputTextStyle, buttonContainerStyle, buttonTextStyle, headerIcon, headerIconStyle, headerTextStyle, imageProps, flatlistProps, textInputProps, textProp, headerText, headerContainerStyle, containerStyle, imageContainerStyle }) => {
|
|
3
3
|
return (<View style={[{ gap: 20 }, containerStyle]}>
|
|
4
|
-
{(headerIcon || headerText) && <View style={[{ flexDirection: "row", gap: 10 }, headerContainerStyle]}>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
{(headerIcon || headerText) && (<View style={[{ flexDirection: "row", gap: 10 }, headerContainerStyle]}>
|
|
5
|
+
{headerIcon && (<View style={imageContainerStyle}>
|
|
6
|
+
<Image source={headerIcon} style={[styles.headericon, headerIconStyle]} {...imageProps}/>
|
|
7
|
+
</View>)}
|
|
8
|
+
{headerText && (<Text style={[styles.headertext, headerTextStyle]} {...textProp}>
|
|
9
|
+
{headerText}
|
|
10
|
+
</Text>)}
|
|
11
|
+
</View>)}
|
|
11
12
|
|
|
12
13
|
<FlatList {...flatlistProps} data={data} keyExtractor={(item) => item.id} ItemSeparatorComponent={() => <View style={{ height: gap_bwt_keys }}/>} renderItem={({ item }) => (<View style={{ gap: gap_bwt_keyValue }}>
|
|
13
14
|
{item.label && (<Text style={[styles.lable, lableStyle]}>{item.label}</Text>)}
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
package/src/Form.tsx
CHANGED
|
@@ -27,24 +27,28 @@ export const Form: React.FC<FormProps> = ({
|
|
|
27
27
|
headerText,
|
|
28
28
|
headerContainerStyle,
|
|
29
29
|
containerStyle,
|
|
30
|
+
imageContainerStyle
|
|
30
31
|
}) => {
|
|
31
32
|
return (
|
|
32
|
-
<View style={[{gap:20},containerStyle]}>
|
|
33
|
-
{(headerIcon || headerText) &&
|
|
34
|
-
{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
<View style={[{ gap: 20 }, containerStyle]}>
|
|
34
|
+
{(headerIcon || headerText) && (
|
|
35
|
+
<View style={[{ flexDirection: "row", gap: 10 }, headerContainerStyle]}>
|
|
36
|
+
{headerIcon && (
|
|
37
|
+
<View style={imageContainerStyle}>
|
|
38
|
+
<Image
|
|
39
|
+
source={headerIcon}
|
|
40
|
+
style={[styles.headericon, headerIconStyle]}
|
|
41
|
+
{...imageProps}
|
|
42
|
+
/>
|
|
43
|
+
</View>
|
|
44
|
+
)}
|
|
45
|
+
{headerText && (
|
|
46
|
+
<Text style={[styles.headertext, headerTextStyle]} {...textProp}>
|
|
47
|
+
{headerText}
|
|
48
|
+
</Text>
|
|
49
|
+
)}
|
|
50
|
+
</View>
|
|
51
|
+
)}
|
|
48
52
|
|
|
49
53
|
<FlatList<FormItem>
|
|
50
54
|
{...flatlistProps}
|