MCPcopy Create free account
hub / github.com/ajsmth/rn-tools / BottomSheetExample

Function BottomSheetExample

example/src/bottom-sheet-example.tsx:10–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const sheets = createSheets();
9
10export function BottomSheetExample() {
11 return (
12 <sheets.Provider>
13 <View className="flex-1 pt-24">
14 <View className="flex-1">
15 <Button title="Show sheet" onPress={() => sheets.open("my-sheet")} />
16
17 <Sheet
18 id="my-sheet"
19 // initialIndex={1}
20 canDismiss
21 // onStateChange={(event) => console.log({ event })}
22 snapPoints={[400, 600, 1200]}
23 appearanceAndroid={{
24 dimAmount: 0,
25 cornerRadius: 32.0,
26 backgroundColor: "#ffffff",
27 }}
28 appearanceIOS={{
29 cornerRadius: 16.0,
30 grabberVisible: true,
31 backgroundColor: "#ffffff",
32 }}
33 >
34 <SheetContent />
35 </Sheet>
36 </View>
37 </View>
38 </sheets.Provider>
39 );
40}
41
42function SheetContent() {
43 const handleClose = React.useCallback(() => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected