diff --git a/shared/ui/src/androidMain/kotlin/com/androidmakers/ui/MainLayout.android.kt b/shared/ui/src/androidMain/kotlin/com/androidmakers/ui/MainLayout.android.kt new file mode 100644 index 00000000..17939d74 --- /dev/null +++ b/shared/ui/src/androidMain/kotlin/com/androidmakers/ui/MainLayout.android.kt @@ -0,0 +1,5 @@ +package com.androidmakers.ui + +import moe.tlaster.precompose.navigation.transition.NavTransition + +actual val defaultTransition: NavTransition = NavTransition() diff --git a/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/MainLayout.kt b/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/MainLayout.kt index 0a778f76..e78b8aa4 100644 --- a/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/MainLayout.kt +++ b/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/MainLayout.kt @@ -1,7 +1,5 @@ package com.androidmakers.ui -import androidx.compose.animation.slideInHorizontally -import androidx.compose.animation.slideOutHorizontally import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.staticCompositionLocalOf @@ -114,13 +112,7 @@ private fun MainNavHost( } } -private val defaultTransition = NavTransition( - createTransition = slideInHorizontally { it }, - pauseTransition = slideOutHorizontally { -it / 4 }, - destroyTransition = slideOutHorizontally { it }, - resumeTransition = slideInHorizontally { -it / 4 }, - exitTargetContentZIndex = 1f -) +expect val defaultTransition: NavTransition expect class PlatformContext diff --git a/shared/ui/src/iosMain/kotlin/com/androidmakers/ui/MainLayout.ios.kt b/shared/ui/src/iosMain/kotlin/com/androidmakers/ui/MainLayout.ios.kt new file mode 100644 index 00000000..e2aea4b1 --- /dev/null +++ b/shared/ui/src/iosMain/kotlin/com/androidmakers/ui/MainLayout.ios.kt @@ -0,0 +1,13 @@ +package com.androidmakers.ui + +import androidx.compose.animation.slideInHorizontally +import androidx.compose.animation.slideOutHorizontally +import moe.tlaster.precompose.navigation.transition.NavTransition + +actual val defaultTransition: NavTransition = NavTransition( + createTransition = slideInHorizontally { it }, + pauseTransition = slideOutHorizontally { -it / 4 }, + destroyTransition = slideOutHorizontally { it }, + resumeTransition = slideInHorizontally { -it / 4 }, + exitTargetContentZIndex = 1f +)