@@ -31,6 +31,7 @@ import androidx.compose.runtime.setValue
3131import androidx.compose.ui.Alignment
3232import androidx.compose.ui.Modifier
3333import androidx.compose.ui.graphics.Color
34+ import androidx.compose.ui.graphics.Shape
3435import androidx.compose.ui.platform.LocalDensity
3536import androidx.compose.ui.platform.LocalWindowInfo
3637import androidx.compose.ui.tooling.preview.Preview
@@ -61,6 +62,7 @@ import kotlinx.coroutines.launch
6162fun BuyOrNotBottomSheet (
6263 onDismissRequest : () -> Unit ,
6364 isHalfExpandedOnly : Boolean = false,
65+ sheetShape : Shape = RoundedCornerShape (26.dp),
6466 sheetState : SheetState =
6567 rememberModalBottomSheetState(
6668 skipPartiallyExpanded = true,
@@ -85,53 +87,65 @@ fun BuyOrNotBottomSheet(
8587 onDismissRequest = onDismissRequest,
8688 modifier =
8789 Modifier
88- .padding(horizontal = 14 .dp)
89- .navigationBarsPadding()
90- .padding(bottom = 20 .dp),
90+ .padding(horizontal = 14 .dp),
91+ // 기존 하단 패딩 제거?
9192 sheetState = sheetState,
92- containerColor = Color . Transparent ,
93- shape = RoundedCornerShape ( 26 .dp),
93+ shape = sheetShape ,
94+ containerColor = Color . Transparent , // 배경 투명하게 -> Spacer
9495 tonalElevation = 0 .dp,
9596 scrimColor = BuyOrNotTheme .colors.gray1000.copy(alpha = 0.5f ),
9697 dragHandle = null ,
9798 ) {
99+ // 실제 보이는 시트 컨테이너
98100 Column (
99- modifier =
100- Modifier
101- .fillMaxWidth()
102- .background(
103- color = BuyOrNotTheme .colors.gray0,
104- shape = RoundedCornerShape (26 .dp),
105- ).then(
106- if (isHalfExpandedOnly) {
107- Modifier .heightIn(max = screenHeight / 2f )
108- } else {
109- Modifier
110- },
111- ),
101+ modifier = Modifier .fillMaxWidth(),
112102 ) {
113- // 드래그 핸들
114- Box (
103+ Column (
115104 modifier =
116105 Modifier
117106 .fillMaxWidth()
118- .padding(top = 10 .dp),
107+ .background(
108+ color = BuyOrNotTheme .colors.gray0,
109+ shape = sheetShape,
110+ ).then(
111+ if (isHalfExpandedOnly) {
112+ Modifier .heightIn(max = screenHeight / 2f )
113+ } else {
114+ Modifier
115+ },
116+ ),
119117 ) {
120- Spacer (
118+ // 드래그 핸들
119+ Box (
121120 modifier =
122121 Modifier
123- .align(Alignment .Center )
124- .width(40 .dp)
125- .height(4 .dp)
126- .background(
127- color = Color (0xFFD9D9D9 ),
128- shape = RoundedCornerShape (18 .dp),
129- ),
130- )
122+ .fillMaxWidth()
123+ .padding(top = 10 .dp),
124+ ) {
125+ Spacer (
126+ modifier =
127+ Modifier
128+ .align(Alignment .Center )
129+ .width(40 .dp)
130+ .height(4 .dp)
131+ .background(
132+ color = Color (0xFFD9D9D9 ),
133+ shape = RoundedCornerShape (18 .dp),
134+ ),
135+ )
136+ }
137+
138+ // 콘텐츠
139+ content(hideSheetWithAnimation)
131140 }
132141
133- // 콘텐츠
134- content(hideSheetWithAnimation)
142+ Spacer (
143+ modifier =
144+ Modifier
145+ .fillMaxWidth()
146+ .navigationBarsPadding() // 시스템 네비게이션 바 대응
147+ .height(20 .dp), // 하단에서 띄우고 싶은 만큼 높이 설정
148+ )
135149 }
136150 }
137151}
0 commit comments