Repository: maragudk/gomponents (go)

Issue:
Add "step" attribute
Used in e.g. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time#using_the_step_attribute

Pull request description:
Add Step attribute
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step

Fixes #120.

Patch:
diff --git a/html/attributes.go b/html/attributes.go
index 5e56683..3c69f94 100644
--- a/html/attributes.go
+++ b/html/attributes.go
@@ -198,6 +198,10 @@ func SrcSet(v string) g.Node {
 	return g.Attr("srcset", v)
 }
 
+func Step(v string) g.Node {
+	return g.Attr("step", v)
+}
+
 func StyleAttr(v string) g.Node {
 	return g.Attr("style", v)
 }


Test patch:
diff --git a/html/attributes_test.go b/html/attributes_test.go
index 4071101..5e2c179 100644
--- a/html/attributes_test.go
+++ b/html/attributes_test.go
@@ -70,6 +70,7 @@ func TestSimpleAttributes(t *testing.T) {
 		"rowspan":      RowSpan,
 		"src":          Src,
 		"srcset":       SrcSet,
+		"step":         Step,
 		"style":        StyleAttr,
 		"tabindex":     TabIndex,
 		"target":       Target,