dhre-ui-kit 0.0.7 → 0.0.8

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.7",
3
+ "version": "0.0.8",
4
4
  "main": "src/index.ts",
5
5
  "files": [
6
6
  "src",
@@ -1,5 +1,5 @@
1
1
  import {ReactNode} from 'react';
2
- import {ViewStyle} from 'react-native';
2
+ import {TextStyle, ViewStyle} from 'react-native';
3
3
 
4
4
  export interface ListItem {
5
5
  id: string;
@@ -33,5 +33,5 @@ export interface SwipableListProps {
33
33
  rightPrimaryActionHandler?: (id: string) => void;
34
34
  rightPrimaryActionStyle?: ViewStyle;
35
35
  itemStyle?: ViewStyle;
36
- titleStyle?: ViewStyle;
36
+ titleStyle?: TextStyle;
37
37
  }
@@ -5,10 +5,15 @@ export const styles = StyleSheet.create({
5
5
  container: {
6
6
  flex: 1,
7
7
  },
8
+ swippableContainer: {paddingVertical: verticalScale(16)},
8
9
  actionButton: {
9
10
  justifyContent: 'center',
10
11
  alignItems: 'center',
11
- padding: moderateScale(24),
12
+ paddingHorizontal: moderateScale(24),
13
+ paddingVertical: moderateScale(8),
14
+ },
15
+ titleStyle: {
16
+ color: '#fff',
12
17
  },
13
18
  leftActions: {
14
19
  flexDirection: 'row',
@@ -40,11 +40,15 @@ const SwipableList = (props: SwipableListProps) => {
40
40
  onPress={onPress}
41
41
  style={[styles.actionButton, style]}>
42
42
  {icon}
43
- <CustomTypography variant="L1_REGULAR" style={titleStyle} text={title} />
43
+ <CustomTypography
44
+ variant="L1_REGULAR"
45
+ style={[styles.titleStyle, titleStyle]}
46
+ text={title}
47
+ />
44
48
  </Pressable>
45
49
  );
46
50
 
47
- const leftActionHandle = item => (
51
+ const leftActionHandle = (item: ListItem) => (
48
52
  <View style={[styles.leftActions, leftPrimaryActionStyle]}>
49
53
  {leftPrimaryActionIcon && (
50
54
  <ActionButton
@@ -67,7 +71,7 @@ const SwipableList = (props: SwipableListProps) => {
67
71
  </View>
68
72
  );
69
73
 
70
- const rightActionHandle = item => (
74
+ const rightActionHandle = (item: ListItem) => (
71
75
  <View style={[styles.rightActions, rightPrimaryActionStyle]}>
72
76
  {rightPrimaryActionIcon && (
73
77
  <ActionButton
@@ -85,7 +89,8 @@ const SwipableList = (props: SwipableListProps) => {
85
89
  <GestureHandlerRootView testID={`${testId}-LIST`} style={styles.container}>
86
90
  <Swipeable
87
91
  renderLeftActions={() => leftActionHandle(item)}
88
- renderRightActions={() => rightActionHandle(item)}>
92
+ renderRightActions={() => rightActionHandle(item)}
93
+ containerStyle={styles.swippableContainer}>
89
94
  {props?.renderItem(item)}
90
95
  </Swipeable>
91
96
  </GestureHandlerRootView>
package/src/index.ts CHANGED
@@ -24,3 +24,4 @@ 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 * from './utils/stylehelper';
@@ -53,33 +53,37 @@ const theme = {
53
53
  dark: '##CECECE',
54
54
  },
55
55
 
56
- BODER_PRIMARY: {
56
+ BORDER_PRIMARY: {
57
57
  light: '#686868',
58
58
  dark: '#404040',
59
59
  },
60
- BODER_SECONDRY: {
60
+ BORDER_SECONDRY: {
61
61
  light: '#A7A7A7',
62
62
  dark: '#686868',
63
63
  },
64
- BODER_DISABLE: {
64
+ BORDER_DISABLE: {
65
65
  light: '#CECECE',
66
66
  dark: '#4F4F4F',
67
67
  },
68
- BODER_INVERTED: {
68
+ BORDER_INVERTED: {
69
69
  light: '#000000',
70
70
  dark: '#FFFFFF',
71
71
  },
72
- BODER_BRAND_STATIC: {
72
+ BORDER_BRAND_STATIC: {
73
73
  light: '#D92D27',
74
74
  dark: '#D92D27',
75
75
  },
76
- BODER_BRAND_TRANSPARENT_STATIC: {
76
+ BORDER_BRAND_TRANSPARENT_STATIC: {
77
77
  light: '#D92D3E',
78
78
  dark: '#D92D3E',
79
79
  },
80
- BODER_STATIC: {
80
+ BORDER_STATIC: {
81
81
  light: '#FFFFFF',
82
82
  dark: '#FFFFFF',
83
83
  },
84
+ BORDER_SEPRATOR: {
85
+ light: '#282828',
86
+ dark: '#FFFFFF',
87
+ },
84
88
  };
85
89
  export default theme;