Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-udy committed Apr 29, 2024
1 parent 04b2e6a commit 12e7e2c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import androidx.compose.ui.platform.LocalInspectionMode
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import dev.enro.core.*
import dev.enro.core.AnyOpenInstruction
import dev.enro.core.EnroException
import dev.enro.core.NavigationDirection
import dev.enro.core.NavigationHandle
import dev.enro.core.NavigationInstruction
import dev.enro.core.NavigationKey
import dev.enro.core.compose.LocalNavigationHandle
import dev.enro.core.controller.EnroDependencyScope
import dev.enro.core.controller.NavigationController
Expand All @@ -29,6 +34,10 @@ internal class PreviewNavigationHandle(
}
}

/**
* Provides a [PreviewNavigationHandle] in the context of the [content] parameter. This is useful for writing @Preview functions
* for Composables which require a NavigationHandle to be present.
*/
@Composable
public fun <T : NavigationKey> EnroPreview(
navigationKey: T,
Expand Down

0 comments on commit 12e7e2c

Please sign in to comment.