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
335 B

package outwatch.router
package dsl
import outwatch.dom.VDomModifier
import outwatch.dom.{dsl => O, _}
object C {
def a[P](linkHref: String)(attrs: VDomModifier*)(implicit store: RouterStore[P]): BasicVNode =
O.a(
O.href := linkHref,
O.onClick.preventDefault.mapTo(Replace(Path(linkHref))) --> store
)(attrs)
}