@hitesh0009/react-native-basic-form 1.1.5 → 1.1.6

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 CHANGED
@@ -1,12 +1,13 @@
1
1
  import { FlatList, Image, StyleSheet, Text, TextInput, TouchableOpacity, View, } from "react-native";
2
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, }) => {
3
3
  return (<View style={[{ gap: 20 }, containerStyle]}>
4
- <View style={[{ flexDirection: "row", gap: 10 }, headerContainerStyle]}>
4
+ {(headerIcon || headerText) && <View style={[{ flexDirection: "row", gap: 10 }, headerContainerStyle]}>
5
5
  {headerIcon && (<Image source={headerIcon} style={[styles.headericon, headerIconStyle]} {...imageProps}/>)}
6
6
  {headerText && (<Text style={[styles.headertext, headerTextStyle]} {...textProp}>
7
7
  {headerText}
8
8
  </Text>)}
9
- </View>
9
+ </View>}
10
+
10
11
 
11
12
  <FlatList {...flatlistProps} data={data} keyExtractor={(item) => item.id} ItemSeparatorComponent={() => <View style={{ height: gap_bwt_keys }}/>} renderItem={({ item }) => (<View style={{ gap: gap_bwt_keyValue }}>
12
13
  {item.label && (<Text style={[styles.lable, lableStyle]}>{item.label}</Text>)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitesh0009/react-native-basic-form",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "A lightweight, data-driven form renderer for React Native with fully controlled inputs and flexible styling.",
5
5
  "keywords": [
6
6
  "react-native",
package/src/Form.tsx CHANGED
@@ -30,7 +30,7 @@ export const Form: React.FC<FormProps> = ({
30
30
  }) => {
31
31
  return (
32
32
  <View style={[{gap:20},containerStyle]}>
33
- <View style={[{ flexDirection: "row",gap:10 }, headerContainerStyle]}>
33
+ {(headerIcon || headerText) && <View style={[{ flexDirection: "row",gap:10 }, headerContainerStyle]}>
34
34
  {headerIcon && (
35
35
  <Image
36
36
  source={headerIcon}
@@ -43,7 +43,8 @@ export const Form: React.FC<FormProps> = ({
43
43
  {headerText}
44
44
  </Text>
45
45
  )}
46
- </View>
46
+ </View>}
47
+
47
48
 
48
49
  <FlatList<FormItem>
49
50
  {...flatlistProps}