@popp0102/nova 0.12.2 → 0.12.4

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