@holper/react-native-holper-storybook 0.6.67 → 0.6.68

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.
@@ -6,6 +6,8 @@ import style from './style';
6
6
 
7
7
  const Input = ({
8
8
  disabled,
9
+ rightIcon,
10
+ rightIconWide,
9
11
  leftIcon,
10
12
  leftIconWide,
11
13
  size,
@@ -18,7 +20,9 @@ const Input = ({
18
20
  style.input,
19
21
  style[variant],
20
22
  style[`${size}Size`],
23
+ rightIcon && style.rightIcon,
21
24
  leftIcon && style.leftIcon,
25
+ rightIconWide && style.rightIconWide,
22
26
  leftIconWide && style.leftIconWide,
23
27
  disabled && style.disabled,
24
28
  ]}
@@ -27,6 +31,16 @@ const Input = ({
27
31
  placeholderTextColor={Colors.midblue}
28
32
  {...props}
29
33
  />
34
+ <View
35
+ style={[
36
+ style[variant],
37
+ style.rightIconContainer,
38
+ rightIconWide ? style.rightWideIconContainer : {},
39
+ disabled ? style.disabled : {},
40
+ ]}
41
+ >
42
+ {rightIcon}
43
+ </View>
30
44
  <View
31
45
  style={[
32
46
  style[variant],
@@ -44,6 +58,8 @@ Input.defaultProps = {
44
58
  disabled: false,
45
59
  leftIcon: null,
46
60
  leftIconWide: false,
61
+ rightIcon: null,
62
+ rightIconWide: false,
47
63
  size: 'fixed',
48
64
  variant: 'default',
49
65
  };
@@ -52,6 +68,8 @@ Input.propTypes = {
52
68
  disabled: PropTypes.bool,
53
69
  leftIcon: PropTypes.node,
54
70
  leftIconWide: PropTypes.bool,
71
+ rightIcon: PropTypes.node,
72
+ rightIconWide: PropTypes.bool,
55
73
  size: PropTypes.oneOf(['fixed', 'fit']),
56
74
  variant: PropTypes.oneOf(['default', 'completed', 'error']),
57
75
  };
@@ -30,9 +30,22 @@ export default {
30
30
  leftIcon: {
31
31
  paddingLeft: 40,
32
32
  },
33
+ rightIcon: {
34
+ paddingRight: 40,
35
+ },
33
36
  leftIconWide: {
34
37
  paddingLeft: 70,
35
38
  },
39
+ rightIconWide: {
40
+ paddingRight: 70,
41
+ },
42
+ rightIconContainer: {
43
+ position: 'absolute',
44
+ right: 10,
45
+ top: 10,
46
+ height: 42,
47
+ justifyContent: 'center',
48
+ },
36
49
  leftIconContainer: {
37
50
  position: 'absolute',
38
51
  left: 10,
@@ -40,6 +53,10 @@ export default {
40
53
  height: 42,
41
54
  justifyContent: 'center',
42
55
  },
56
+ rightWideIconContainer: {
57
+ paddingLeft: 2,
58
+ borderLeftWidth: 1,
59
+ },
43
60
  leftWideIconContainer: {
44
61
  paddingRight: 2,
45
62
  borderRightWidth: 1,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "main": "lib/index.js",
3
3
  "name": "@holper/react-native-holper-storybook",
4
4
  "description": "A component library for Holper projects",
5
- "version": "0.6.67",
5
+ "version": "0.6.68",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "lib",