all repos — gomponents @ f22ce3fb68ca6702a683b7759410ae50a9fddabd

HTML components in pure Go

Add If helper function (#57) Used to inline conditional nodes.

Markus Wüstenberg
commit

f22ce3fb68ca6702a683b7759410ae50a9fddabd

parent

428a2519eaa8e16767f86b417abd5af007f24fc6

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)) +}