dhre-ui-kit 0.0.11 → 0.0.13

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.11",
3
+ "version": "0.0.13",
4
4
  "main": "src/index.ts",
5
5
  "files": [
6
6
  "src",
package/src/App.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import {ThemeProvider} from './theme/ThemeContext';
3
- import {Badge} from './index';
3
+ import {Badge, Line} from './index';
4
4
  import {ArrowLeft, CalenderDots} from './assets';
5
5
  import {View} from 'react-native';
6
6
  import CustomButton from './components/button/Button';
@@ -17,7 +17,7 @@ const App = () => {
17
17
  textStyle={{color: 'black'}}
18
18
  iconStyle={{}}
19
19
  />
20
-
20
+ <Line />
21
21
  <CustomButton
22
22
  title="Yes"
23
23
  onPress={() => console.log('Yes Button Pressed')}
@@ -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
  };
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import {View, StyleSheet, ViewStyle} from 'react-native';
3
+ import {useTheme} from '../../theme/ThemeContext';
4
+
5
+ const HorizontalLine = ({style}: {style?: ViewStyle}) => {
6
+ const {theme} = useTheme();
7
+ return (
8
+ <View
9
+ style={[
10
+ styles.line,
11
+ {backgroundColor: theme['SURFACE_SECONDARY']},
12
+ style,
13
+ ]}
14
+ />
15
+ );
16
+ };
17
+
18
+ const styles = StyleSheet.create({
19
+ line: {
20
+ height: 1,
21
+ width: '100%',
22
+ },
23
+ });
24
+
25
+ export default HorizontalLine;
@@ -0,0 +1 @@
1
+ export {default} from './Line';
@@ -0,0 +1,84 @@
1
+ import React, {ReactElement} from 'react';
2
+ import {TouchableOpacity, View, StyleSheet, ViewStyle} from 'react-native';
3
+ import {SvgProps} from 'react-native-svg';
4
+ import {useTheme} from '../../theme/ThemeContext';
5
+ import CustomText from '../customText';
6
+
7
+ interface OurOfficesButtonProps {
8
+ rightIcon?: ReactElement<SvgProps>;
9
+ onPress: () => void;
10
+ title: string;
11
+ subTitle?: string;
12
+ containterStyle?: ViewStyle;
13
+ }
14
+ const Topic = ({
15
+ rightIcon,
16
+ onPress,
17
+ title,
18
+ subTitle,
19
+ containterStyle,
20
+ }: OurOfficesButtonProps) => {
21
+ const {theme} = useTheme();
22
+ return (
23
+ <TouchableOpacity
24
+ style={[
25
+ styles.button,
26
+ {backgroundColor: theme['SURFACE_SECONDARY']},
27
+ containterStyle,
28
+ ]}
29
+ onPress={onPress}>
30
+ {rightIcon && (
31
+ <View style={styles.rightIconContainer}>
32
+ {React.cloneElement(rightIcon)}
33
+ </View>
34
+ )}
35
+ <View style={styles.textContainer}>
36
+ {subTitle && (
37
+ <CustomText
38
+ text={subTitle}
39
+ variant="L3_REGULAR"
40
+ textColor="CONTENT_PRIMARY"
41
+ />
42
+ )}
43
+ <CustomText
44
+ text={title}
45
+ variant="L1_REGULAR"
46
+ textColor="CONTENT_PRIMARY"
47
+ />
48
+ </View>
49
+ </TouchableOpacity>
50
+ );
51
+ };
52
+
53
+ const styles = StyleSheet.create({
54
+ button: {
55
+ flexDirection: 'row',
56
+ alignItems: 'center',
57
+ height: 75,
58
+ width: 158,
59
+ borderRadius: 10,
60
+ marginLeft: 12,
61
+ marginVertical: 14,
62
+ },
63
+ iconContainer: {
64
+ marginHorizontal: 16,
65
+ },
66
+ textContainer: {
67
+ flex: 1,
68
+ position: 'absolute',
69
+ padding: 10,
70
+ bottom: 0,
71
+ marginHorizontal: 8,
72
+ marginTop: 20,
73
+ },
74
+ titleText: {
75
+ marginBottom: 4,
76
+ },
77
+ rightIconContainer: {
78
+ position: 'absolute',
79
+ right: 10,
80
+ top: 10,
81
+ },
82
+ });
83
+
84
+ export default Topic;
@@ -0,0 +1 @@
1
+ export {default} from './Topic';
package/src/index.ts CHANGED
@@ -25,4 +25,7 @@ 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
27
  export {default as CustomLoader} from './components/customLoader';
28
+ export {default as Line} from './components/horizontalLine';
29
+ export {default as Topic} from './components/topic';
30
+
28
31
  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',