diff options
author | Markus Wüstenberg | 2020-12-10 14:20:33 +0100 |
---|---|---|
committer | GitHub | 2020-12-10 14:20:33 +0100 |
commit | febffb600db7fbfd81827ded1b8fa3774bf42107 (patch) | |
tree | 853ef8b506ec986f3e4bfe11dc93486af4131006 /examples/simple | |
parent | 100ae9e8308f380eeb3c6a5ea7a7e3277483aa43 (diff) | |
download | gomponents-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/simple')
-rw-r--r-- | examples/simple/simple.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/simple/simple.go b/examples/simple/simple.go index 529cf18..c872512 100644 --- a/examples/simple/simple.go +++ b/examples/simple/simple.go @@ -64,7 +64,7 @@ func navbar(props navbarProps) g.Node { lis := g.Map(len(items), func(i int) g.Node { item := items[i] return h.Li( - h.A(item.path, c.Classes(map[string]bool{"is-active": props.path == item.path}), g.Text(item.text)), + h.A(h.Href(item.path), c.Classes(map[string]bool{"is-active": props.path == item.path}), g.Text(item.text)), ) }) return h.Ul(h.Class("nav"), g.Group(lis)) |