1
0

Add stroke-width SVG attribute (#116)

This commit is contained in:
Markus Wüstenberg 2022-11-15 14:48:01 +01:00 committed by GitHub
parent b12942fb32
commit a5a7242ae0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 6 deletions

View File

@ -24,6 +24,10 @@ func Stroke(v string) g.Node {
return g.Attr("stroke", v)
}
func StrokeWidth(v string) g.Node {
return g.Attr("stroke-width", v)
}
func ViewBox(v string) g.Node {
return g.Attr("viewBox", v)
}

View File

@ -11,12 +11,13 @@ import (
func TestSimpleAttributes(t *testing.T) {
cases := map[string]func(string) g.Node{
"clip-rule": ClipRule,
"d": D,
"fill": Fill,
"fill-rule": FillRule,
"stroke": Stroke,
"viewBox": ViewBox,
"clip-rule": ClipRule,
"d": D,
"fill": Fill,
"fill-rule": FillRule,
"stroke": Stroke,
"stroke-width": StrokeWidth,
"viewBox": ViewBox,
}
for name, fn := range cases {