dhre-ui-kit 0.0.12 → 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
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')}
|
|
@@ -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';
|