From 4b43db02778b025f825a6bf5547fda716e0bcdf8 Mon Sep 17 00:00:00 2001 From: MohamedRejeb Date: Mon, 24 Jun 2024 11:01:44 +0100 Subject: [PATCH] Pass currentCompositionLocalContext to iOS bottom sheet content --- .../calf/ui/sheet/AdaptiveBottomSheet.ios.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/sheet/AdaptiveBottomSheet.ios.kt b/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/sheet/AdaptiveBottomSheet.ios.kt index 56695bb..cd3e618 100644 --- a/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/sheet/AdaptiveBottomSheet.ios.kt +++ b/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/sheet/AdaptiveBottomSheet.ios.kt @@ -28,9 +28,7 @@ actual fun AdaptiveBottomSheet( windowInsets: WindowInsets, content: @Composable() (ColumnScope.() -> Unit) ) { - val colorScheme = MaterialTheme.colorScheme - val typography = MaterialTheme.typography - val shapes = MaterialTheme.shapes + val compositionLocalContext = currentCompositionLocalContext val sheetHelper = remember { BottomSheetManager( @@ -38,11 +36,7 @@ actual fun AdaptiveBottomSheet( onDismissRequest() }, content = { - MaterialTheme( - colorScheme = colorScheme, - typography = typography, - shapes = shapes, - ) { + CompositionLocalProvider(compositionLocalContext) { Column( modifier = Modifier.fillMaxSize() ) {