Add If helper function (#57) Used to inline conditional nodes.
1 file changed, 10 insertions(+), 0 deletions(-)
changed files
A components/elements.go
@@ -0,0 +1,10 @@ +package components + +import ( + g "github.com/maragudk/gomponents" + . "github.com/maragudk/gomponents/html" +) + +func InputHidden(name, value string, children ...g.Node) g.NodeFunc { + return Input(Type("hidden"), Name(name), Value(value), g.Group(children)) +}