@holper/react-native-holper-storybook 0.6.97 → 0.6.98

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.
@@ -1,12 +1,27 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { SafeAreaView } from 'react-native-safe-area-context';
4
- import { TouchableWithoutFeedback, Keyboard, ScrollView, View } from 'react-native';
5
- import {ViewPropTypes} from 'deprecated-react-native-prop-types';
4
+ import {
5
+ TouchableWithoutFeedback,
6
+ Keyboard,
7
+ ScrollView,
8
+ View,
9
+ } from 'react-native';
10
+ import { ViewPropTypes } from 'deprecated-react-native-prop-types';
6
11
  import style from './style';
7
12
 
8
- const Container = ({ fullScreen, enableScroll, style: customStyle, scrollStyle, children, ...props }) => (
9
- <SafeAreaView {...props} style={[fullScreen ? style.fullScreen : {}, customStyle]}>
13
+ const Container = ({
14
+ fullScreen = true,
15
+ enableScroll,
16
+ style: customStyle,
17
+ scrollStyle,
18
+ children,
19
+ ...props
20
+ }) => (
21
+ <SafeAreaView
22
+ {...props}
23
+ style={[fullScreen ? style.fullScreen : {}, customStyle]}
24
+ >
10
25
  {enableScroll ? (
11
26
  <ScrollView
12
27
  contentContainerStyle={scrollStyle}
@@ -16,13 +31,8 @@ const Container = ({ fullScreen, enableScroll, style: customStyle, scrollStyle,
16
31
  {children}
17
32
  </ScrollView>
18
33
  ) : (
19
- <TouchableWithoutFeedback
20
- onPress={Keyboard.dismiss}
21
- accessible={false}
22
- >
23
- <View style={customStyle}>
24
- {children}
25
- </View>
34
+ <TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
35
+ <View style={customStyle}>{children}</View>
26
36
  </TouchableWithoutFeedback>
27
37
  )}
28
38
  </SafeAreaView>
@@ -32,14 +42,14 @@ Container.defaultProps = {
32
42
  fullScreen: true,
33
43
  enableScroll: false,
34
44
  style: {},
35
- scrollStyle: {}
45
+ scrollStyle: {},
36
46
  };
37
47
 
38
48
  Container.propTypes = {
39
49
  fullScreen: PropTypes.bool,
40
50
  enableScroll: PropTypes.bool,
41
51
  style: ViewPropTypes.style,
42
- scrollStyle: ViewPropTypes.style
52
+ scrollStyle: ViewPropTypes.style,
43
53
  };
44
54
 
45
55
  export default Container;
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.97",
5
+ "version": "0.6.98",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "lib",