Add svg package and a few helpers (#67) Introducing SVG, to inline vector graphics in your HTML! 🥳
1 file changed, 29 insertions(+), 0 deletions(-)
changed files
A 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) +}