@popp0102/nova 0.12.0 → 0.12.2

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.
@@ -3,10 +3,14 @@ import { SafeAreaView } from 'react-native-safe-area-context';
3
3
  import { LinearGradient } from 'expo-linear-gradient';
4
4
 
5
5
  export default function Screen({ style, children, gradientColors, backgroundImage }) {
6
- const content = (
7
- <SafeAreaView style={[styles.safeArea, style]}>
6
+ const gradientOrView = gradientColors ? (
7
+ <LinearGradient colors={gradientColors} style={styles.gradient}>
8
8
  {children}
9
- </SafeAreaView>
9
+ </LinearGradient>
10
+ ) : (
11
+ <View style={styles.gradient}>
12
+ {children}
13
+ </View>
10
14
  );
11
15
 
12
16
  const withBackground = backgroundImage ? (
@@ -16,21 +20,16 @@ export default function Screen({ style, children, gradientColors, backgroundImag
16
20
  imageStyle={{ opacity: backgroundImage.opacity ?? 0.1 }}
17
21
  resizeMode="cover"
18
22
  >
19
- {content}
23
+ {gradientOrView}
20
24
  </ImageBackground>
21
- ) : content;
22
-
23
- return gradientColors ? (
24
- <LinearGradient
25
- colors={gradientColors}
26
- style={styles.gradient}
27
- >
28
- {withBackground}
29
- </LinearGradient>
30
25
  ) : (
31
- <View style={styles.gradient}>
26
+ gradientOrView
27
+ );
28
+
29
+ return (
30
+ <SafeAreaView style={[styles.safeArea, style]} edges={['top', 'left', 'right', 'bottom']}>
32
31
  {withBackground}
33
- </View>
32
+ </SafeAreaView>
34
33
  );
35
34
  }
36
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popp0102/nova",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "React Native component library",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",