icerockdev / moko-widgets

Multiplatform UI DSL with screen management in common code for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev
Apache License 2.0
387 stars 32 forks source link

showBottomSheet screen action #73

Closed Alex009 closed 4 years ago

Alex009 commented 4 years ago

Just like dialogs we need showing of bottomsheets, like:

ios: img1 2 0 1 Sign In

android: 2 0 1 Sign In

for android it is BottomSheets but for iOS should be own implementation.

common api is:

expect fun Screen<*>.showBottomSheet(
    content: Widget<WidgetSize<SizeSpec.MatchParent, SizeSpec.WrapContent>>,
   onDismiss: () -> Unit
)

in actual implementation we should create own bottomSheet and insert into body view created from content widget.

Alex009 commented 4 years ago

merged. API:

fun Screen<*>.showBottomSheet(
    content: Widget<WidgetSize.Const<SizeSpec.AsParent, SizeSpec.WrapContent>>,
    onDismiss: () -> Unit
)

added as separated module: moko-widgets-bottomsheet and require cocoapod moko-widgets-bottomsheet