about summary refs log tree commit diff stats
path: root/examples/dot-import/dot-import.go
diff options
context:
space:
mode:
authorMarkus Wüstenberg2020-12-10 14:20:33 +0100
committerGitHub2020-12-10 14:20:33 +0100
commitfebffb600db7fbfd81827ded1b8fa3774bf42107 (patch)
tree853ef8b506ec986f3e4bfe11dc93486af4131006 /examples/dot-import/dot-import.go
parent100ae9e8308f380eeb3c6a5ea7a7e3277483aa43 (diff)
downloadgomponents-febffb600db7fbfd81827ded1b8fa3774bf42107.tar.lz
gomponents-febffb600db7fbfd81827ded1b8fa3774bf42107.tar.zst
gomponents-febffb600db7fbfd81827ded1b8fa3774bf42107.zip
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.
Diffstat (limited to 'examples/dot-import/dot-import.go')
-rw-r--r--examples/dot-import/dot-import.go2
1 files changed, 1 insertions, 1 deletions
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))
 }