dhre-ui-kit 0.0.54 → 0.0.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dhre-ui-kit",
3
- "version": "0.0.54",
3
+ "version": "0.0.56",
4
4
  "main": "src/index.ts",
5
5
  "files": [
6
6
  "src",
@@ -29,14 +29,14 @@ interface MobileNumberInputProps {
29
29
  defaultCallingCode?: string;
30
30
  placeholder: string;
31
31
  onChangeText: (text: string) => void;
32
- value: string;
32
+ value?: string;
33
33
  containerStyle?: ViewStyle;
34
34
  inputStyle?: TextStyle;
35
35
  countryPickerStyle?: ViewStyle;
36
36
  callingCodeStyle?: TextStyle;
37
37
  getCountryCode: (countryCode: string) => void;
38
38
  maxLength: number;
39
- errorMessage: string;
39
+ errorMessage?: string;
40
40
  label: string;
41
41
  }
42
42
 
@@ -27,6 +27,7 @@ interface CustomDropdownProps {
27
27
  iconColor?: string;
28
28
  itemTextStyle?: TextStyle;
29
29
  onValueChange?: (value: string) => void;
30
+ itemContainerStyle?: ViewStyle;
30
31
  }
31
32
 
32
33
  const CustomDropdown: React.FC<CustomDropdownProps> = ({
@@ -45,6 +46,7 @@ const CustomDropdown: React.FC<CustomDropdownProps> = ({
45
46
  iconColor,
46
47
  itemTextStyle,
47
48
  onValueChange,
49
+ itemContainerStyle,
48
50
  }) => {
49
51
  const [value, setValue] = useState<string | undefined>(defaultValue);
50
52
  const [isFocus, setIsFocus] = useState<boolean>(false);
@@ -97,6 +99,7 @@ const CustomDropdown: React.FC<CustomDropdownProps> = ({
97
99
  iconColor={iconColor}
98
100
  dropdownPosition="bottom"
99
101
  itemTextStyle={itemTextStyle}
102
+ itemContainerStyle={[styles.itemListStyle, itemContainerStyle]}
100
103
  />
101
104
  </View>
102
105
  );
@@ -134,6 +137,9 @@ const styles = StyleSheet.create({
134
137
  width: horizontalScale(20),
135
138
  height: verticalScale(20),
136
139
  },
140
+ itemListStyle: {
141
+ maxHeight: verticalScale(150),
142
+ },
137
143
  });
138
144
 
139
145
  export default CustomDropdown;
@@ -8,7 +8,7 @@ import theme from '../../theme/themes';
8
8
 
9
9
  interface CommonTextInputProps {
10
10
  label: string;
11
- value: string;
11
+ value?: string;
12
12
  onChangeText: (text: string) => void;
13
13
  placeholderText?: string;
14
14
  isSecureTextEntry?: boolean;
@@ -40,7 +40,7 @@ const CommonTextInput: React.FC<CommonTextInputProps> = ({
40
40
  mode="outlined"
41
41
  outlineStyle={{
42
42
  ...styles.outlineStyle,
43
- borderColor: value.length ? activeBorderColor : inactiveBorderColor,
43
+ borderColor: value?.length ? activeBorderColor : inactiveBorderColor,
44
44
  }}
45
45
  label={label}
46
46
  value={value}