MCPcopy Create free account
hub / github.com/AppAndFlow/react-native-safe-area-context / SheetScreen

Function SheetScreen

example/src/FormSheetExample.tsx:77–103  ·  view source on GitHub ↗
({ title = 'SafeAreaView in a form sheet' })

Source from the content-addressed store, hash-verified

75}
76
77function SheetScreen({ title = 'SafeAreaView in a form sheet' }) {
78 const [busy, setBusy] = React.useState(false);
79 const [manyViews, setManyViews] = React.useState(false);
80 useBusyJsThread(busy);
81 return (
82 <ScrollView contentContainerStyle={styles.sheetContent}>
83 <SafeAreaView edges={['left', 'right']}>
84 <View style={styles.box}>
85 <Text style={styles.title}>{title}</Text>
86 <Text style={styles.text}>
87 Rotate the device. The red border must stay clear of the notch on
88 both sides, right after the rotation.
89 </Text>
90 <View style={styles.row}>
91 <Text style={styles.text}>Busy JS thread</Text>
92 <Switch value={busy} onValueChange={setBusy} />
93 </View>
94 <View style={styles.row}>
95 <Text style={styles.text}>Mount 200 SafeAreaViews</Text>
96 <Switch value={manyViews} onValueChange={setManyViews} />
97 </View>
98 {manyViews && <ManySafeAreaViews />}
99 </View>
100 </SafeAreaView>
101 </ScrollView>
102 );
103}
104
105function SheetWithProviderScreen() {
106 return (

Callers

nothing calls this directly

Calls 1

useBusyJsThreadFunction · 0.85

Tested by

no test coverage detected