Skip to content

Commit

Permalink
Add rounded corners to BottomSheet
Browse files Browse the repository at this point in the history
  • Loading branch information
tillh-stripe committed Aug 14, 2023
1 parent c85c75b commit b88c55b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.layout.windowInsetsBottomHeight
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.ModalBottomSheetDefaults
import androidx.compose.material.ModalBottomSheetLayout
Expand All @@ -31,6 +32,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.unit.dp
import com.google.accompanist.systemuicontroller.rememberSystemUiController
import com.stripe.android.uicore.StripeThemeDefaults
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.flow.first

Expand Down Expand Up @@ -164,6 +166,10 @@ internal fun BottomSheet(
.statusBarsPadding()
.imePadding(),
sheetState = state.modalBottomSheetState,
sheetShape = RoundedCornerShape(
topStart = StripeThemeDefaults.shapes.cornerRadius.dp,
topEnd = StripeThemeDefaults.shapes.cornerRadius.dp,
),
sheetContent = {
Box(modifier = Modifier.testTag(BottomSheetContentTestTag)) {
sheetContent()
Expand Down

0 comments on commit b88c55b

Please sign in to comment.