Skip to content

Commit

Permalink
Make sheet handle always take up full width
Browse files Browse the repository at this point in the history
  • Loading branch information
StylianosGakis committed Nov 15, 2024
1 parent a9fc117 commit ccc7716
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import androidx.compose.foundation.layout.only
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.safeDrawing
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.verticalScroll
Expand Down Expand Up @@ -206,7 +207,7 @@ private fun InternalHedvigBottomSheet(
.verticalScroll(scrollState),
) {
Spacer(modifier = Modifier.height(8.dp))
DragHandle(modifier = Modifier.align(Alignment.CenterHorizontally))
DragHandle(modifier = Modifier.fillMaxWidth().wrapContentWidth(Alignment.CenterHorizontally))
Spacer(modifier = Modifier.height(20.dp))
content()
}
Expand All @@ -228,16 +229,15 @@ private fun InternalHedvigBottomSheet(

@Composable
private fun DragHandle(modifier: Modifier = Modifier) {
Surface(
Box(
modifier = modifier
.width(40.dp)
.height(4.dp)
.background(
shape = HedvigTheme.shapes.cornerSmall,
color = bottomSheetColors.chipColor,
)
.clip(HedvigTheme.shapes.cornerSmall),
) {}
)
}

@Composable
Expand Down

0 comments on commit ccc7716

Please sign in to comment.