@hitesh0009/react-native-basic-form 1.2.1 → 1.2.2
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 +4 -4
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
- package/src/Form.tsx +7 -4
- package/src/types.ts +3 -0
package/dist/Form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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, imageContainerStyle, touchableOpacityProp, inputTextContainerStyle, inputTextGroupContainerStyle, ButtonContainerStyle, buttonGroupContainerStyle, buttonGroupStyle, inputButtonGroupContainerStyle, }) => {
|
|
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, touchableOpacityProp, inputTextContainerStyle, inputTextGroupContainerStyle, ButtonContainerStyle, buttonGroupContainerStyle, buttonGroupStyle, inputButtonGroupContainerStyle, inputButtonGroupInputStyle, inputButtonGroupButtonStyle, inputButtonGroupButtonTextStyle }) => {
|
|
3
3
|
return (<View style={[{ gap: 20 }, containerStyle]}>
|
|
4
4
|
{(headerIcon || headerText) && (<View style={[{ flexDirection: "row", gap: 10 }, headerContainerStyle]}>
|
|
5
5
|
{headerIcon && (<View style={imageContainerStyle}>
|
|
@@ -50,7 +50,7 @@ export const Form = ({ data, gap_bwt_keyValue = 10, gap_bwt_keys = 12, lableStyl
|
|
|
50
50
|
{item.inputButtonGroup.input.header}
|
|
51
51
|
</Text>
|
|
52
52
|
|
|
53
|
-
<TextInput {...textInputProps} style={[styles.inputtext,
|
|
53
|
+
<TextInput {...textInputProps} style={[styles.inputtext, inputButtonGroupInputStyle]} placeholder={item.inputButtonGroup.input.placeholder} value={item.inputButtonGroup.input.value} onChangeText={item.inputButtonGroup.input.onChangeText} keyboardType={item.inputButtonGroup.input.keyboardType}/>
|
|
54
54
|
</View>
|
|
55
55
|
|
|
56
56
|
<View style={{ gap: gap_bwt_keyValue }}>
|
|
@@ -58,8 +58,8 @@ export const Form = ({ data, gap_bwt_keyValue = 10, gap_bwt_keys = 12, lableStyl
|
|
|
58
58
|
{item.inputButtonGroup.button.header}
|
|
59
59
|
</Text>
|
|
60
60
|
|
|
61
|
-
<TouchableOpacity onPress={item.inputButtonGroup.button.onPress} style={[styles.button_container,
|
|
62
|
-
<Text style={[styles.button_text,
|
|
61
|
+
<TouchableOpacity onPress={item.inputButtonGroup.button.onPress} style={[styles.button_container, inputButtonGroupButtonStyle]}>
|
|
62
|
+
<Text style={[styles.button_text, inputButtonGroupButtonTextStyle]}>
|
|
63
63
|
{item.inputButtonGroup.button.label}
|
|
64
64
|
</Text>
|
|
65
65
|
</TouchableOpacity>
|
package/dist/types.d.ts
CHANGED
|
@@ -65,4 +65,7 @@ export type FormProps = {
|
|
|
65
65
|
buttonGroupStyle?: ViewStyle;
|
|
66
66
|
inputTextGroupContainerStyle?: ViewStyle;
|
|
67
67
|
inputButtonGroupContainerStyle?: ViewStyle;
|
|
68
|
+
inputButtonGroupInputStyle?: ViewStyle;
|
|
69
|
+
inputButtonGroupButtonStyle?: ViewStyle;
|
|
70
|
+
inputButtonGroupButtonTextStyle?: ViewStyle;
|
|
68
71
|
};
|
package/package.json
CHANGED
package/src/Form.tsx
CHANGED
|
@@ -41,6 +41,9 @@ export const Form: React.FC<FormProps> = ({
|
|
|
41
41
|
buttonGroupStyle,
|
|
42
42
|
|
|
43
43
|
inputButtonGroupContainerStyle,
|
|
44
|
+
inputButtonGroupInputStyle,
|
|
45
|
+
inputButtonGroupButtonStyle,
|
|
46
|
+
inputButtonGroupButtonTextStyle
|
|
44
47
|
}) => {
|
|
45
48
|
return (
|
|
46
49
|
<View style={[{ gap: 20 }, containerStyle]}>
|
|
@@ -147,9 +150,9 @@ export const Form: React.FC<FormProps> = ({
|
|
|
147
150
|
{item.inputButtonGroup.input.header}
|
|
148
151
|
</Text>
|
|
149
152
|
|
|
150
|
-
<TextInput
|
|
153
|
+
<TextInput
|
|
151
154
|
{...textInputProps}
|
|
152
|
-
style={[styles.inputtext,
|
|
155
|
+
style={[styles.inputtext, inputButtonGroupInputStyle]}
|
|
153
156
|
placeholder={item.inputButtonGroup.input.placeholder}
|
|
154
157
|
value={item.inputButtonGroup.input.value}
|
|
155
158
|
onChangeText={item.inputButtonGroup.input.onChangeText}
|
|
@@ -164,9 +167,9 @@ export const Form: React.FC<FormProps> = ({
|
|
|
164
167
|
|
|
165
168
|
<TouchableOpacity
|
|
166
169
|
onPress={item.inputButtonGroup.button.onPress}
|
|
167
|
-
style={[styles.button_container,
|
|
170
|
+
style={[styles.button_container, inputButtonGroupButtonStyle]}
|
|
168
171
|
>
|
|
169
|
-
<Text style={[styles.button_text,
|
|
172
|
+
<Text style={[styles.button_text, inputButtonGroupButtonTextStyle]}>
|
|
170
173
|
{item.inputButtonGroup.button.label}
|
|
171
174
|
</Text>
|
|
172
175
|
</TouchableOpacity>
|
package/src/types.ts
CHANGED
|
@@ -88,4 +88,7 @@ export type FormProps = {
|
|
|
88
88
|
buttonGroupStyle?: ViewStyle;
|
|
89
89
|
inputTextGroupContainerStyle?: ViewStyle;
|
|
90
90
|
inputButtonGroupContainerStyle?: ViewStyle;
|
|
91
|
+
inputButtonGroupInputStyle?:ViewStyle,
|
|
92
|
+
inputButtonGroupButtonStyle?:ViewStyle,
|
|
93
|
+
inputButtonGroupButtonTextStyle?:ViewStyle
|
|
91
94
|
};
|