about summary refs log tree commit diff stats
path: root/html
diff options
context:
space:
mode:
authorGuy-Laurent Subri2024-10-10 13:31:17 +0200
committerGitHub2024-10-10 13:31:17 +0200
commit05d56605492cb89bebd80421a6d2afaa947344f0 (patch)
tree53abbe9bbe0a8fc21c77053dc4448c9853af38a6 /html
parent73373c8a290e8f16e0ac59b5aa082ca9a21cec98 (diff)
downloadgomponents-05d56605492cb89bebd80421a6d2afaa947344f0.tar.lz
gomponents-05d56605492cb89bebd80421a6d2afaa947344f0.tar.zst
gomponents-05d56605492cb89bebd80421a6d2afaa947344f0.zip
Add missing 'hidden' attribute (#224)
Diffstat (limited to 'html')
-rw-r--r--html/attributes.go4
-rw-r--r--html/attributes_test.go1
2 files changed, 5 insertions, 0 deletions
diff --git a/html/attributes.go b/html/attributes.go
index 7748e0e..2e9a05a 100644
--- a/html/attributes.go
+++ b/html/attributes.go
@@ -145,6 +145,10 @@ func Height(v string) g.Node {
 	return g.Attr("height", v)
 }
 
+func Hidden(v string) g.Node {
+	return g.Attr("hidden", v)
+}
+
 func Href(v string) g.Node {
 	return g.Attr("href", v)
 }
diff --git a/html/attributes_test.go b/html/attributes_test.go
index 8f72e41..e5ea3f4 100644
--- a/html/attributes_test.go
+++ b/html/attributes_test.go
@@ -62,6 +62,7 @@ func TestSimpleAttributes(t *testing.T) {
 		{Name: "for", Func: For},
 		{Name: "form", Func: FormAttr},
 		{Name: "height", Func: Height},
+		{Name: "hidden", Func: Hidden},
 		{Name: "href", Func: Href},
 		{Name: "id", Func: ID},
 		{Name: "integrity", Func: Integrity},