From febffb600db7fbfd81827ded1b8fa3774bf42107 Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Thu, 10 Dec 2020 14:20:33 +0100 Subject: Simplify available elements (#55) `a`, `form`, `img`, `input`, `label`, `option`, `progress`, `select`, and `textarea` are now just regular elements (without helper parameters), because: - Sometimes the use case doesn't fit (`a` as anchor without href, for example) - There's no reason these are special among the others, so streamlining them makes sense Also added new attributes `action`, `alt`, `for`, `method` that I had somehow missed.--- examples/dot-import/dot-import.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/dot-import') diff --git a/examples/dot-import/dot-import.go b/examples/dot-import/dot-import.go index 1d595b8..d735785 100644 --- a/examples/dot-import/dot-import.go +++ b/examples/dot-import/dot-import.go @@ -40,5 +40,5 @@ func Navbar(currentPath string) g.Node { } func NavbarLink(href, name, currentPath string) g.Node { - return A(href, Classes{"is-active": currentPath == href}, g.Text(name)) + return A(Href(href), Classes{"is-active": currentPath == href}, g.Text(name)) } -- cgit 1.4.1