dhre-ui-kit 0.0.27 → 0.0.28

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.27",
3
+ "version": "0.0.28",
4
4
  "main": "src/index.ts",
5
5
  "files": [
6
6
  "src",
@@ -11,4 +11,5 @@ export interface CustomSearchBarProps extends TextInputProps {
11
11
  onSearchIconPress?: () => void;
12
12
  onCrossIconPress?: () => void;
13
13
  handleOnChangeText?: (text: string) => void;
14
+ rightIcon?:React.ReactElement;
14
15
  }
@@ -16,6 +16,7 @@ const CustomSearchBar = ({
16
16
  onSearchIconPress,
17
17
  onCrossIconPress,
18
18
  handleOnChangeText,
19
+ rightIcon=<CrossIcon/>,
19
20
  ...props
20
21
  }: CustomSearchBarProps) => {
21
22
  const [value, setValue] = useState('');
@@ -62,7 +63,7 @@ const CustomSearchBar = ({
62
63
  onCrossIconPress?.(); // Call custom handler if provided
63
64
  }}
64
65
  style={crossIconStyle}>
65
- {React.cloneElement(<CrossIcon />, {
66
+ {React.cloneElement(rightIcon, {
66
67
  width: moderateScale(24),
67
68
  height: moderateScale(24),
68
69
  style: [styles.crossIconStyle, crossIconStyle],