-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to customize ModalBottomSheet appearance in BottomSheetOverlay #1059
Add ability to customize ModalBottomSheet appearance in BottomSheetOverlay #1059
Conversation
Thanks for the contribution! Before we can merge this, we need @chriswiesner to sign the Salesforce Inc. Contributor License Agreement. |
I figured that these customizations could also be done by creating a custom |
I'm open to adding these, though I wonder if there's a way to make this more generic (maybe a |
We could add a "DialogOverlay" where one could supply their own content and trigger the dismiss when appropriate. Mostly as a simple Overlay impl with prebuilt back handling and dismiss logic. I'm cool with this for the bottom sheet though, not much more we can do to make it agnostic while still being a |
@@ -42,35 +44,67 @@ private constructor( | |||
private val model: Model, | |||
private val dismissOnTapOutside: Boolean = true, | |||
private val onDismiss: (() -> Result)? = null, | |||
private val sheetShape: androidx.compose.ui.graphics.Shape? = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets remove the full qualification of Shape
here and on the public constructors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I've read that you're not accepting external contributions - raised the limitations of the
BottomSheetOverlay
in a discussion - but thought it might be a quick win if we could incorporate those changes directly.This change adds the ability to customize the
ModalBottomSheet
s appearance:dragHandle
sheetShape
containerColor
Additionally it adds the ability to specify if the partiallyExpanded state of the sheet should be skipped. (There are use cases where the sheet should directly expand to it's full height)
Would be great if this could be incorporated.
Let me know if the optional parameters in the existing constructors are fine or there should be dedicated ones.