-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added scommons-react-navigation module
- Loading branch information
1 parent
918b019
commit 6cd818b
Showing
13 changed files
with
395 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
navigation/src/main/scala/scommons/react/navigation/StackRouteConfig.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package scommons.react.navigation | ||
|
||
import scommons.react.ReactClass | ||
|
||
import scala.scalajs.js | ||
|
||
trait StackRouteConfig extends js.Object { | ||
|
||
val screen: ReactClass | ||
|
||
val path: js.UndefOr[String] = js.undefined | ||
val params: js.UndefOr[js.Object] = js.undefined | ||
|
||
val navigationOptions: js.UndefOr[js.Function1[js.Object, js.Object]] = js.undefined | ||
} |
13 changes: 13 additions & 0 deletions
13
navigation/src/main/scala/scommons/react/navigation/raw/ReactNavigation.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package scommons.react.navigation.raw | ||
|
||
import io.github.shogowada.scalajs.reactjs.classes.ReactClass | ||
|
||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.JSImport | ||
|
||
@js.native | ||
@JSImport("react-navigation", JSImport.Namespace) | ||
object ReactNavigation extends js.Object { | ||
|
||
def createAppContainer(comp: ReactClass): ReactClass = js.native | ||
} |
13 changes: 13 additions & 0 deletions
13
navigation/src/main/scala/scommons/react/navigation/raw/ReactNavigationStack.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package scommons.react.navigation.raw | ||
|
||
import scommons.react.ReactClass | ||
|
||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.JSImport | ||
|
||
@js.native | ||
@JSImport("react-navigation-stack", JSImport.Namespace) | ||
object ReactNavigationStack extends js.Object { | ||
|
||
def createStackNavigator(routeConfigs: js.Object): ReactClass = js.native | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package definitions | ||
|
||
import common.Libs | ||
import sbt.Keys._ | ||
import sbt._ | ||
import scoverage.ScoverageKeys.coverageExcludedPackages | ||
|
||
object ReactNavigation extends ScalaJsModule { | ||
|
||
override val id: String = "scommons-react-navigation" | ||
|
||
override val base: File = file("navigation") | ||
|
||
override def definition: Project = super.definition | ||
.settings( | ||
description := "Scala.js facades for react-navigation Components and Api", | ||
coverageExcludedPackages := "scommons.react.navigation.raw" | ||
) | ||
|
||
override val internalDependencies: Seq[ClasspathDep[ProjectReference]] = Nil | ||
|
||
override val superRepoProjectsDependencies: Seq[(String, String, Option[String])] = Seq( | ||
("scommons-react", "scommons-react-core", None) | ||
) | ||
|
||
override val runtimeDependencies: Def.Initialize[Seq[ModuleID]] = Def.setting(Seq( | ||
Libs.scommonsReactCore.value | ||
)) | ||
|
||
override val testDependencies: Def.Initialize[Seq[ModuleID]] = Def.setting(Nil) | ||
} |
Oops, something went wrong.