You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
313 B

  1. package outwatch.router
  2. package dsl
  3. import outwatch._
  4. import outwatch.dsl._
  5. object C {
  6. def link[P](linkHref: String)(attrs: VDomModifier*)(implicit store: RouterStore[P]): BasicVNode =
  7. a(href := linkHref)(
  8. onClick.preventDefault.useLazy(Replace(Path(linkHref))) --> store.sink,
  9. attrs,
  10. )
  11. }