@hitesh0009/react-native-basic-form 1.1.1 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  import { FlatList, StyleSheet, Text, TextInput, TouchableOpacity, View, } from "react-native";
2
- export const Form = ({ data, gap_bwt_keyValue = 10, gap_bwt_keys = 12, lable_style, inputtext_style, button_container_style, buttontext_style, placeholderTextColor = "#999", multiline_input = false, textAlignVertical_input = "center", }) => {
2
+ export const Form = ({ data, gap_bwt_keyValue = 10, gap_bwt_keys = 12, lable_style, inputtext_style, button_container_style, buttontext_style, placeholderTextColor = "#999", multiline_input = false, textAlignVertical_input = "center", scrollEnabled = true, showsHorizontalScrollIndicator = true }) => {
3
3
  return (<View>
4
- <FlatList data={data} keyExtractor={(item) => item.id} ItemSeparatorComponent={() => <View style={{ height: gap_bwt_keys }}/>} renderItem={({ item }) => (<View style={{ gap: gap_bwt_keyValue }}>
4
+ <FlatList scrollEnabled={scrollEnabled} showsHorizontalScrollIndicator={showsHorizontalScrollIndicator} data={data} keyExtractor={(item) => item.id} ItemSeparatorComponent={() => <View style={{ height: gap_bwt_keys }}/>} renderItem={({ item }) => (<View style={{ gap: gap_bwt_keyValue }}>
5
5
  {item.label && (<Text style={[styles.lable, lable_style]}>{item.label}</Text>)}
6
6
 
7
7
  {item.input && (<TextInput style={[styles.inputtext, inputtext_style]} placeholder={item.input.placeholder} placeholderTextColor={placeholderTextColor} multiline={multiline_input} textAlignVertical={textAlignVertical_input} value={item.input.value} onChangeText={item.input.onChangeText}/>)}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { TextStyle, ViewStyle } from 'react-native';
1
+ import type { TextStyle, ViewStyle } from "react-native";
2
2
  export type FormInput = {
3
3
  placeholder?: string;
4
4
  value: string;
@@ -23,6 +23,8 @@ export type FormProps = {
23
23
  button_container_style?: ViewStyle;
24
24
  buttontext_style?: TextStyle;
25
25
  placeholderTextColor?: string;
26
+ scrollEnabled?: boolean;
27
+ showsHorizontalScrollIndicator?: boolean;
26
28
  multiline_input?: boolean;
27
29
  textAlignVertical_input?: "top" | "center" | "bottom" | "auto" | undefined;
28
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitesh0009/react-native-basic-form",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
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
@@ -19,10 +19,15 @@ export const Form: React.FC<FormProps> = ({
19
19
  placeholderTextColor = "#999",
20
20
  multiline_input = false,
21
21
  textAlignVertical_input = "center",
22
+ scrollEnabled= true,
23
+ showsHorizontalScrollIndicator= true
24
+
22
25
  }) => {
23
26
  return (
24
27
  <View>
25
28
  <FlatList<FormItem>
29
+ scrollEnabled={scrollEnabled}
30
+ showsHorizontalScrollIndicator={showsHorizontalScrollIndicator}
26
31
  data={data}
27
32
  keyExtractor={(item) => item.id}
28
33
  ItemSeparatorComponent={() => <View style={{ height: gap_bwt_keys }} />}
package/src/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { TextStyle, ViewStyle, } from 'react-native';
1
+ import type { TextStyle, ViewStyle } from "react-native";
2
2
 
3
3
  export type FormInput = {
4
4
  placeholder?: string;
@@ -31,6 +31,9 @@ export type FormProps = {
31
31
 
32
32
  placeholderTextColor?: string;
33
33
 
34
+ scrollEnabled?: boolean;
35
+ showsHorizontalScrollIndicator?: boolean;
36
+
34
37
  multiline_input?: boolean;
35
38
  textAlignVertical_input?: "top" | "center" | "bottom" | "auto" | undefined;
36
39
  };