Files
Shoppy/src/components/layout/ScreenContainer.js
T
2026-07-01 10:33:17 +02:00

28 lines
581 B
JavaScript

import { ScrollView, StyleSheet, View } from 'react-native';
import { colors } from '../../utils/constants';
export default function ScreenContainer({ children, scroll = true }) {
if (!scroll) {
return <View style={styles.container}>{children}</View>;
}
return (
<ScrollView contentContainerStyle={styles.content} style={styles.container}>
{children}
</ScrollView>
);
}
const styles = StyleSheet.create({
container: {
backgroundColor: colors.background,
flex: 1
},
content: {
gap: 18,
padding: 20,
paddingBottom: 110
}
});