about summary refs log tree commit diff stats
path: root/svg/attributes.go
diff options
context:
space:
mode:
authorMarkus Wüstenberg2021-05-05 12:53:32 +0200
committerGitHub2021-05-05 12:53:32 +0200
commit6f7752c20f605dda102992a984d111cdcd19c57b (patch)
treedea0456f501b0aea7894fbe8ca689df48f46861e /svg/attributes.go
parenteb1d1f22b4a8b59d12e05b813eafcfa629a90df7 (diff)
downloadgomponents-6f7752c20f605dda102992a984d111cdcd19c57b.tar.lz
gomponents-6f7752c20f605dda102992a984d111cdcd19c57b.tar.zst
gomponents-6f7752c20f605dda102992a984d111cdcd19c57b.zip
Add svg package and a few helpers (#67)
Introducing SVG, to inline vector graphics in your HTML! 🥳
Diffstat (limited to 'svg/attributes.go')
-rw-r--r--svg/attributes.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/svg/attributes.go b/svg/attributes.go
new file mode 100644
index 0000000..10b7c69
--- /dev/null
+++ b/svg/attributes.go
@@ -0,0 +1,29 @@
+package svg
+
+import (
+	g "github.com/maragudk/gomponents"
+)
+
+func ClipRule(v string) g.Node {
+	return g.Attr("clip-rule", v)
+}
+
+func D(v string) g.Node {
+	return g.Attr("d", v)
+}
+
+func Fill(v string) g.Node {
+	return g.Attr("fill", v)
+}
+
+func FillRule(v string) g.Node {
+	return g.Attr("fill-rule", v)
+}
+
+func Stroke(v string) g.Node {
+	return g.Attr("stroke", v)
+}
+
+func ViewBox(v string) g.Node {
+	return g.Attr("viewBox", v)
+}