({ title = 'SafeAreaView in a form sheet' })
| 75 | } |
| 76 | |
| 77 | function 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 | |
| 105 | function SheetWithProviderScreen() { |
| 106 | return ( |
nothing calls this directly
no test coverage detected