Skip to content

Commit

Permalink
Add enabled property on ModalBottomSheet
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstyl committed Aug 3, 2024
1 parent 390489f commit 4ff5d33
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions core/src/commonMain/kotlin/ModalBottomSheet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@ import androidx.compose.animation.core.AnimationSpec
import androidx.compose.animation.core.MutableTransitionState
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.focusable
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.text.BasicText
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.derivedStateOf
Expand All @@ -26,12 +20,10 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.mapSaver
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.key.Key
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.unit.dp
import kotlinx.coroutines.delay

public data class ModalSheetProperties(
Expand Down Expand Up @@ -181,6 +173,7 @@ public fun ModalBottomSheetScope.Scrim(
@Composable
public fun ModalBottomSheetScope.Sheet(
modifier: Modifier = Modifier,
enabled: Boolean = true,
content: @Composable() (BottomSheetScope.() -> Unit)
) {
var hasBeenIntroduced by remember { mutableStateOf(false) }
Expand Down Expand Up @@ -229,6 +222,7 @@ public fun ModalBottomSheetScope.Sheet(
}
BottomSheet(
state = sheetState,
enabled = enabled,
modifier = modifier,
content = content
)
Expand Down

0 comments on commit 4ff5d33

Please sign in to comment.