From 5714269e04b2b3754465a3f621e187ee9cab0c43 Mon Sep 17 00:00:00 2001 From: Hyobeen-Park Date: Thu, 16 Jan 2025 09:11:31 +0900 Subject: [PATCH] =?UTF-8?q?[FEAT/#24]=20basic=20bottom=20sheet=20dragHandl?= =?UTF-8?q?e=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/bottomsheet/FixedBottomSheet.kt | 2 +- .../bottomsheet/SpoonyBasicBottomSheet.kt | 30 ++----------------- .../bottomsheet/SpoonyFlexibleBottomSheet.kt | 2 +- 3 files changed, 4 insertions(+), 30 deletions(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/FixedBottomSheet.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/FixedBottomSheet.kt index 54612fdd..a8653a0c 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/FixedBottomSheet.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/FixedBottomSheet.kt @@ -42,7 +42,7 @@ fun FixedBottomSheet( private fun FixedBottomSheetPreview() { SpoonyAndroidTheme { FixedBottomSheet( - sheetContent = {}, + sheetContent = {} ) { } } } diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/SpoonyBasicBottomSheet.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/SpoonyBasicBottomSheet.kt index 4cd7a6f3..0d924513 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/SpoonyBasicBottomSheet.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/SpoonyBasicBottomSheet.kt @@ -1,33 +1,24 @@ package com.spoony.spoony.core.designsystem.component.bottomsheet -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size import androidx.compose.material3.BottomSheetDefaults import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ModalBottomSheet import androidx.compose.material3.SheetState import androidx.compose.material3.rememberModalBottomSheetState import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp import com.spoony.spoony.core.designsystem.theme.SpoonyAndroidTheme @OptIn(ExperimentalMaterial3Api::class) @Composable fun SpoonyBasicBottomSheet( - content: @Composable () -> Unit, onDismiss: () -> Unit, modifier: Modifier = Modifier, sheetState: SheetState = rememberModalBottomSheetState(), isBackgroundDimmed: Boolean = true, dragHandle: @Composable () -> Unit = {}, + content: @Composable () -> Unit ) { ModalBottomSheet( onDismissRequest = onDismiss, @@ -35,24 +26,7 @@ fun SpoonyBasicBottomSheet( sheetState = sheetState, containerColor = SpoonyAndroidTheme.colors.white, scrimColor = if (isBackgroundDimmed) BottomSheetDefaults.ScrimColor else Color.Transparent, - dragHandle = { - Column( - horizontalAlignment = Alignment.CenterHorizontally, - modifier = Modifier - .padding(vertical = 22.dp) - .fillMaxWidth() - ) { - Box( - modifier = Modifier - .size( - width = 24.dp, - height = Dp.Hairline.plus(2.dp) - ) - .background(SpoonyAndroidTheme.colors.gray300), - ) - dragHandle() - } - } + dragHandle = dragHandle ) { content() } diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/SpoonyFlexibleBottomSheet.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/SpoonyFlexibleBottomSheet.kt index 9d1c7fa3..04d3ae69 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/SpoonyFlexibleBottomSheet.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/bottomsheet/SpoonyFlexibleBottomSheet.kt @@ -18,7 +18,7 @@ fun SpoonyFlexibleBottomSheet( modifier: Modifier = Modifier, minHeight: Dp = 50.dp, dragHandle: @Composable () -> Unit = {}, - content: @Composable () -> Unit, + content: @Composable () -> Unit ) { val configuration = LocalConfiguration.current val screenHeight = configuration.screenHeightDp.dp