Something went wrong. Try again.
Bluesky app fork with some witchin' additions 💫 forked from jollywhoppers.com/witchsky.app
Something went wrong. Try again.
1.1 kB · 47 lines
Swift
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748import ExpoModulesCore
public class BottomSheetModule: Module { public func definition() -> ModuleDefinition { Name("BottomSheet")
AsyncFunction("dismissAll") { SheetManager.shared.dismissAll() }
View(SheetView.self) { Events([ "onAttemptDismiss", "onSnapPointChange", "onStateChange" ])
AsyncFunction("dismiss") { (view: SheetView) in view.dismiss() }
AsyncFunction("updateLayout") { (view: SheetView) in view.updateLayout() }
Prop("cornerRadius") { (view: SheetView, prop: Float) in view.cornerRadius = CGFloat(prop) }
Prop("minHeight") { (view: SheetView, prop: Double) in view.minHeight = prop }
Prop("maxHeight") { (view: SheetView, prop: Double) in view.maxHeight = prop }
Prop("preventDismiss") { (view: SheetView, prop: Bool) in view.preventDismiss = prop }
Prop("preventExpansion") { (view: SheetView, prop: Bool) in view.preventExpansion = prop } } }}