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

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.
@@ -4,15 +4,23 @@ import { TextInput, View } from 'react-native';
4
4
  import { Colors } from '../../configs/constants';
5
5
  import style from './style';
6
6
 
7
- const Input = ({ variant, disabled, leftIcon, leftIconWide, ...props }) => (
7
+ const Input = ({
8
+ disabled,
9
+ leftIcon,
10
+ leftIconWide,
11
+ size,
12
+ variant,
13
+ ...props
14
+ }) => (
8
15
  <View>
9
16
  <TextInput
10
17
  style={[
11
18
  style.input,
12
19
  style[variant],
13
- leftIcon ? style.leftIcon : {},
14
- leftIconWide ? style.leftIconWide : {},
15
- disabled ? style.disabled : {},
20
+ style[`${size}Size`],
21
+ leftIcon && style.leftIcon,
22
+ leftIconWide && style.leftIconWide,
23
+ disabled && style.disabled,
16
24
  ]}
17
25
  editable={!disabled}
18
26
  allowFontScaling={false}
@@ -33,17 +41,19 @@ const Input = ({ variant, disabled, leftIcon, leftIconWide, ...props }) => (
33
41
  );
34
42
 
35
43
  Input.defaultProps = {
36
- variant: 'default',
37
44
  disabled: false,
38
45
  leftIcon: null,
39
46
  leftIconWide: false,
47
+ size: 'fixed',
48
+ variant: 'default',
40
49
  };
41
50
 
42
51
  Input.propTypes = {
43
- variant: PropTypes.oneOf(['default', 'completed', 'error']),
44
52
  disabled: PropTypes.bool,
45
53
  leftIcon: PropTypes.node,
46
54
  leftIconWide: PropTypes.bool,
55
+ size: PropTypes.oneOf(['fixed', 'fit']),
56
+ variant: PropTypes.oneOf(['default', 'completed', 'error']),
47
57
  };
48
58
 
49
59
  export default Input;
@@ -6,7 +6,6 @@ const { width } = Dimensions.get('window');
6
6
  export default {
7
7
  input: {
8
8
  height: 50,
9
- width: width - 80,
10
9
  borderRadius,
11
10
  borderWidth: 1,
12
11
  paddingHorizontal: 20,
@@ -45,4 +44,10 @@ export default {
45
44
  paddingRight: 2,
46
45
  borderRightWidth: 1,
47
46
  },
47
+ fixedSize: {
48
+ width: width - 80,
49
+ },
50
+ fitSize: {
51
+ width: '100%',
52
+ },
48
53
  };
@@ -19,6 +19,7 @@ export const Colors = {
19
19
  blue: '#2A539C',
20
20
  // Violet
21
21
  violet: '#300049',
22
+ placeboPurple: '#F0ECFE',
22
23
  // Reds
23
24
  lightred: '#FFC1C1',
24
25
  red: '#FD4C4C',
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.65",
5
+ "version": "0.6.67",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "lib",