Files
Dabur_StoreDNA1/src/components/Background.js
T
2025-06-25 16:36:17 +05:30

28 lines
722 B
JavaScript

// src/components/Background.js
import React from 'react';
import { StyleSheet, SafeAreaView, StatusBar } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
const Background = ({ children, barcolor = 'light-content'}) => {
return (
<SafeAreaView style={styles.container}>
<StatusBar barStyle={barcolor} backgroundColor="transparent" translucent />
<LinearGradient colors={['#E3EBF8', '#ffffff']} start={{ x: 0.5, y: 0 }} end={{ x: 0.5, y: 1 }} style={styles.gradient}>
{children}
</LinearGradient>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
gradient: {
flex: 1,
},
});
export default Background;