oyvindberg on v1.0.0-beta32
oyvindberg on gh-pages
Deploy website Deploy website … (compare)
oyvindberg on sbt15
oyvindberg on master
Support sbt 1.5.x along with 1.… (compare)
oyvindberg on sbt15
Support sbt 1.5.x along with 1.… (compare)
oyvindberg on scala-ast-codec
JSON codec for scala AST - Col… (compare)
oyvindberg on reintroduce-circe-fork
oyvindberg on master
Revert "Prepare to release on m… (compare)
oyvindberg on reintroduce-circe-fork
Revert "Prepare to release on m… (compare)
oyvindberg on master
Update os-lib to 0.7.4 (#288) (compare)
oyvindberg on master
Update sourcecode to 0.2.5 (#28… (compare)
oyvindberg on master
Update fansi to 0.2.12 (#286) (compare)
oyvindberg on master
Update scalatest to 3.2.7 (#285) (compare)
oyvindberg on master
Followup from #283, only rewrit… (compare)
oyvindberg on type-aliases-with-intersection-types
oyvindberg on master
Make typa aliases with intersec… (compare)
oyvindberg on master
Update sbt-mdoc to 2.2.19 (#284) (compare)
oyvindberg on type-aliases-with-intersection-types
Make typa aliases with intersec… (compare)
oyvindberg on master
Update sbt-ci-release to 1.5.7 … (compare)
oyvindberg on gh-pages
Deploy website Deploy website … (compare)
@react
object Header {
private val css = HeaderStyle
case class Props(menuHandler: () => Unit, userProfile: String)
val component = FunctionalComponent[Props] { props =>
val (profile, setProfile) = useState(???)
val (profileOpen, setProfileOpen) = useState(false)
def profileClickHandlerOpen(event: SyntheticMouseEvent[dom.raw.HTMLElement]): Unit = {
setProfile(event.currentTarget)
setProfileOpen(true)
}
def profileClickHandlerClose: SyntheticEvent[Event, Object] => Unit = _ => {
setProfileOpen(false)
setProfile(???)
}
header(className := "headerArea")(
Grid.container(true).spacing(GridSpacing.`8`).alignItems(GridItemsAlignment.center)(
Hidden.mdUp(true)(
Grid.item(true).xs(GridSize.`2`)(
ul(className := "headerLeft")(
li(onClick := props.menuHandler, className := "menuTrigger")(
svg(slinky.web.svg.className := "svg-inline--fa fa-bars fa-w-14 fa-fw", slinky.web.svg.role := "img", slinky.web.svg.aria-"hidden" := "true", CustomAttribute[String]("focusable") := "false", CustomAttribute[String]("date-prefix") := "fal",
CustomAttribute[String]("data-icon") := "bars", CustomAttribute[String]("xlmns") := "http://www.w3.org/2000/svg", CustomAttribute[String]("viewBox") := "0 0 448 512")(
path(fill := "currentColor", d := "M442 114H6a6 6 0 0 1-6-6V84a6 6 0 0 1 6-6h436a6 6 0 0 1 6 6v24a6 6 0 0 1-6 6zm0 160H6a6 6 0 0 1-6-6v-24a6 6 0 0 1 6-6h436a6 6 0 0 1 6 6v24a6 6 0 0 1-6 6zm0 160H6a6 6 0 0 1-6-6v-24a6 6 0 0 1 6-6h436a6 6 0 0 1 6 6v24a6 6 0 0 1-6 6z")
)
)
)
)
),
Grid.md(GridSize.`12`).item(true).xs(GridSize.`10`)(
ul(className := "headerRight")(
div(className := "profileWrap")(
span(className := "profileImg")(
img(src := Avatar.asInstanceOf[String], alt := "avatar")
),
span(onClick := (event => profileClickHandlerOpen(event)), className := "name")(
span(className := "text")("test"),
i(className := "fa fa-angle-down")
),
Menu.apply(profileOpen).keepMounted(true).anchorEl(profile).onClose(profileClickHandlerClose).elevation(1).className("profileWrapper").anchorOrigin(PopoverOrigin(center, top)).getContentAnchorElNull
.transformOrigin(PopoverOrigin(center, top)).classes(PartialClassNameMapMenuCl.apply().setPaper("profilePaper"))(
ul(
li("test"),
li("test")
)
/* Button.component(router.Link[String](to = "/profile"): ReactElement)("Profile"),
Button.component(router.Link[String](to = "/"): ReactElement)("Logout") */
)
)
)
)
)
)
}
}
T | Null
you have to cast, at least until scala 3. I typically write some helper methods for it, but there is nothing in scala, scala.js or ST to make that smooth to work with for now.
:=
and friends) I can recommend to have a look inside typings.react.components
, you will find all of a
, button
and so on using the same builder pattern as the ST components
did you figure it out @pme123 ? seems like its coming from somewhere inside webpack?
Ok finally I found the time - started from scratch and it worked - I created a simple example project with all the nice stuff from the Slinky starter project and a working Scalably Plotly example: https://github.com/pme123/scalably-slinky-example
Uncaught TypeError: Cannot read property 'ResponsiveContainer' of undefined
at $c_Ltypings_recharts_components_ResponsiveContainer$.make__Ltypings_recharts_components_ResponsiveContainer$__sjs_js_Array (ResponsiveContainer.scala:40)
at eval (OrderChart.scala:33)
at $c_sjsr_AnonFunction1.apply__O__O (AnonFunctions.scala:27)
at $c_Lslinky_core_FunctionalComponent$.slinky$core$FunctionalComponent$$$anonfun$apply$1__sjs_js_Object__F1__sr_ObjectRef__Lslinky_core_facade_ReactElement (FunctionalComponent.scala:108)
at OrderChart (FunctionalComponent.scala:106)
at renderWithHooks (react-dom.development.js:14803)
at mountIndeterminateComponent (react-dom.development.js:17482)
at beginWork (react-dom.development.js:18596)
at HTMLUnknownElement.callCallback (react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
typings.materialUiCore.anon.PartialClassNameMapExpansDisabled
works fine on windows, but not my linux machine :(
ResponsiveContainer
works there, so there is no particularly good reason why it shouldnt work in another project.
show stConversionOptions
in sbt, and also give me the full error message please
@oyvindberg apparently, reloading on a page other than the home doesn't work, was the fix that I pushed deployed? or it be that there is another change needed for the github pages side?
About this, I remember now, the webserver needs to be configured to serve the index when the file is not found, which I have no idea if can be done on gh pages with your current settings