2121 */
2222package com.composeunstyled.demo
2323
24- import androidx.compose.animation.fadeIn
25- import androidx.compose.animation.fadeOut
2624import androidx.compose.foundation.background
2725import androidx.compose.foundation.border
2826import androidx.compose.foundation.layout.Box
27+ import androidx.compose.foundation.layout.fillMaxSize
2928import androidx.compose.foundation.layout.fillMaxWidth
3029import androidx.compose.foundation.layout.height
3130import androidx.compose.foundation.layout.padding
@@ -38,54 +37,53 @@ import androidx.compose.ui.Modifier
3837import androidx.compose.ui.draw.clip
3938import androidx.compose.ui.graphics.Color
4039import androidx.compose.ui.unit.dp
41- import com.composeunstyled.Scrim
4240import com.composeunstyled.Sheet
4341import com.composeunstyled.SheetDetent
44- import com.composeunstyled.UnstyledModalBottomSheet
45- import com.composeunstyled.rememberModalBottomSheetState
42+ import com.composeunstyled.UnstyledBottomSheet
43+ import com.composeunstyled.rememberBottomSheetState
4644
4745@Composable
4846internal fun ModalBottomSheetExpandedReproScaffold (
4947 content : @Composable () -> Unit ,
5048) {
51- val sheetState = rememberModalBottomSheetState (
49+ val sheetState = rememberBottomSheetState (
5250 initialDetent = SheetDetent .FullyExpanded ,
5351 detents = listOf (SheetDetent .Hidden , SheetDetent .FullyExpanded ),
5452 )
5553
56- UnstyledModalBottomSheet (
57- state = sheetState,
58- overlay = {
59- Scrim (
60- scrimColor = Color .Black .copy(0.3f ),
61- enter = fadeIn(),
62- exit = fadeOut(),
63- )
64- },
54+ Box (
55+ modifier = Modifier
56+ .fillMaxSize()
57+ .background(Color .Black .copy(0.3f )),
6558 ) {
66- Box (
67- modifier = Modifier .fillMaxWidth() ,
68- contentAlignment = Alignment . TopCenter ,
59+ UnstyledBottomSheet (
60+ state = sheetState ,
61+ modifier = Modifier .fillMaxSize() ,
6962 ) {
70- Sheet (
71- modifier = Modifier
72- .widthIn(max = 640 .dp)
73- .fillMaxWidth()
74- .clip(RoundedCornerShape (topStart = 28 .dp, topEnd = 28 .dp))
75- .background(Color (0xFFF8FAFC ))
76- .border(1 .dp, Color (0xFFCACACA ), RoundedCornerShape (topStart = 28 .dp, topEnd = 28 .dp)),
63+ Box (
64+ modifier = Modifier .fillMaxWidth(),
65+ contentAlignment = Alignment .TopCenter ,
7766 ) {
78- Box (Modifier .fillMaxWidth()) {
79- content()
80- Box (
81- Modifier .fillMaxWidth().padding(top = 22 .dp),
82- contentAlignment = Alignment .Center ,
83- ) {
67+ Sheet (
68+ modifier = Modifier
69+ .widthIn(max = 640 .dp)
70+ .fillMaxWidth()
71+ .clip(RoundedCornerShape (topStart = 28 .dp, topEnd = 28 .dp))
72+ .background(Color (0xFFF8FAFC ))
73+ .border(1 .dp, Color (0xFFCACACA ), RoundedCornerShape (topStart = 28 .dp, topEnd = 28 .dp)),
74+ ) {
75+ Box (Modifier .fillMaxWidth()) {
76+ content()
8477 Box (
85- modifier = Modifier
86- .background(Color (0xFFCACACA ), RoundedCornerShape (100 ))
87- .size(32 .dp, 4 .dp),
88- )
78+ Modifier .fillMaxWidth().padding(top = 22 .dp),
79+ contentAlignment = Alignment .Center ,
80+ ) {
81+ Box (
82+ modifier = Modifier
83+ .background(Color (0xFFCACACA ), RoundedCornerShape (100 ))
84+ .size(32 .dp, 4 .dp),
85+ )
86+ }
8987 }
9088 }
9189 }
0 commit comments