MCPcopy Index your code
hub / github.com/callstack/react-native-paper / ScreenWrapper

Function ScreenWrapper

example/src/ScreenWrapper.tsx:22–61  ·  view source on GitHub ↗
({
  children,
  withScrollView = true,
  style,
  contentContainerStyle,
  ...rest
}: Props)

Source from the content-addressed store, hash-verified

20};
21
22export default function ScreenWrapper({
23 children,
24 withScrollView = true,
25 style,
26 contentContainerStyle,
27 ...rest
28}: Props) {
29 const theme = useExampleTheme();
30
31 const insets = useSafeAreaInsets();
32
33 const containerStyle = [
34 styles.container,
35 {
36 backgroundColor: theme.colors.background,
37 paddingBottom: insets.bottom,
38 paddingLeft: insets.left,
39 paddingRight: insets.left,
40 },
41 ];
42
43 return (
44 <>
45 {withScrollView ? (
46 <ScrollView
47 {...rest}
48 contentContainerStyle={contentContainerStyle}
49 keyboardShouldPersistTaps="always"
50 alwaysBounceVertical={false}
51 showsVerticalScrollIndicator={false}
52 style={[containerStyle, style]}
53 >
54 {children}
55 </ScrollView>
56 ) : (
57 <View style={[containerStyle, style]}>{children}</View>
58 )}
59 </>
60 );
61}
62
63const styles = StyleSheet.create({
64 container: {

Callers

nothing calls this directly

Calls 1

useExampleThemeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…