dhre-ui-kit 0.0.10 → 0.0.12

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.10",
3
+ "version": "0.0.12",
4
4
  "main": "src/index.ts",
5
5
  "files": [
6
6
  "src",
@@ -20,7 +20,7 @@ interface CustomButtonProps {
20
20
  titleColor?: string;
21
21
  titleVariant?: string;
22
22
  imagePosition?: 'left' | 'right';
23
- testID?:string
23
+ testID?: string;
24
24
  }
25
25
 
26
26
  const CustomButton = ({
@@ -37,7 +37,8 @@ const CustomButton = ({
37
37
  imagePosition = 'right',
38
38
  }: CustomButtonProps) => {
39
39
  return (
40
- <TouchableOpacity testID={testID}
40
+ <TouchableOpacity
41
+ testID={testID}
41
42
  style={[styles.buttonContainer, containerStyle]}
42
43
  onPress={onPress}>
43
44
  {imagePosition === 'left' && leftIcon && (
@@ -0,0 +1,3 @@
1
+ export interface CustomLoaderProps {
2
+ loading: boolean;
3
+ }
@@ -0,0 +1,16 @@
1
+ import {StyleSheet} from 'react-native';
2
+
3
+ const styles = StyleSheet.create({
4
+ container: {
5
+ flex: 1,
6
+ justifyContent: 'center',
7
+ alignItems: 'center',
8
+ backgroundColor: 'transparent',
9
+ position: 'absolute',
10
+ width: '100%',
11
+ height: '100%',
12
+ zIndex: 1000,
13
+ },
14
+ });
15
+
16
+ export default styles;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import {View, ActivityIndicator} from 'react-native';
3
+ import {CustomLoaderProps} from './CustomLoader.inteface';
4
+ import styles from './CustomLoader.styles';
5
+
6
+ const CustomLoader = ({loading}: CustomLoaderProps) => {
7
+ if (!loading) return null;
8
+
9
+ return (
10
+ <View style={styles.container}>
11
+ <ActivityIndicator size="large" color="#686868" />
12
+ </View>
13
+ );
14
+ };
15
+
16
+ export default CustomLoader;
@@ -0,0 +1 @@
1
+ export {default} from './CustomLoader';
@@ -1,5 +1,5 @@
1
1
  import React, {useState} from 'react';
2
- import {TextInput, View} from 'react-native';
2
+ import {Pressable, TextInput, View} from 'react-native';
3
3
  import {CrossIcon, SearchIcon} from '../../assets';
4
4
  import {moderateScale, verticalScale} from '../../utils/stylehelper';
5
5
  import {CustomSearchBarProps} from './CustomSearchBar.interface';
@@ -42,12 +42,15 @@ const CustomSearchBar = ({
42
42
  handleOnChangeText?.(val);
43
43
  }}
44
44
  />
45
- {value &&
46
- React.cloneElement(<CrossIcon onPress={() => setValue('')} />, {
47
- width: moderateScale(24),
48
- height: moderateScale(24),
49
- style: styles.crossIconStyle,
50
- })}
45
+ {value && (
46
+ <Pressable onPress={() => setValue('')}>
47
+ {React.cloneElement(<CrossIcon />, {
48
+ width: moderateScale(24),
49
+ height: moderateScale(24),
50
+ style: styles.crossIconStyle,
51
+ })}
52
+ </Pressable>
53
+ )}
51
54
  </View>
52
55
  );
53
56
  };
package/src/index.ts CHANGED
@@ -24,4 +24,5 @@ export {default as CustomHeader} from './components/customHeader';
24
24
  export {default as SwipableList} from './components/swipableList';
25
25
  export {default as CustomTypography} from './components/customTypography';
26
26
  export {default as CustomIcon} from './components/customIcon';
27
+ export {default as CustomLoader} from './components/customLoader';
27
28
  export * from './utils/stylehelper';
@@ -153,7 +153,7 @@ export const DHRE_DEFAULT = {
153
153
  DH_LINE_GREY_600: '#B4B2B2',
154
154
  DH_LINE_GREY_700: '#959494',
155
155
  DH_LINE_GREY_800: '#727171',
156
- DH_LINE_GREY_900: '#4D4C4C',
156
+ DH_NETURAL_GRAY_800: '#373737',
157
157
  DH_BLUE: '#007AFF',
158
158
 
159
159
  DH_BG_GREY_0: '#F5F7FF',