Add stroke-width SVG attribute (#116)
This commit is contained in:
parent
b12942fb32
commit
a5a7242ae0
@ -24,6 +24,10 @@ func Stroke(v string) g.Node {
|
|||||||
return g.Attr("stroke", v)
|
return g.Attr("stroke", v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func StrokeWidth(v string) g.Node {
|
||||||
|
return g.Attr("stroke-width", v)
|
||||||
|
}
|
||||||
|
|
||||||
func ViewBox(v string) g.Node {
|
func ViewBox(v string) g.Node {
|
||||||
return g.Attr("viewBox", v)
|
return g.Attr("viewBox", v)
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,13 @@ import (
|
|||||||
|
|
||||||
func TestSimpleAttributes(t *testing.T) {
|
func TestSimpleAttributes(t *testing.T) {
|
||||||
cases := map[string]func(string) g.Node{
|
cases := map[string]func(string) g.Node{
|
||||||
"clip-rule": ClipRule,
|
"clip-rule": ClipRule,
|
||||||
"d": D,
|
"d": D,
|
||||||
"fill": Fill,
|
"fill": Fill,
|
||||||
"fill-rule": FillRule,
|
"fill-rule": FillRule,
|
||||||
"stroke": Stroke,
|
"stroke": Stroke,
|
||||||
"viewBox": ViewBox,
|
"stroke-width": StrokeWidth,
|
||||||
|
"viewBox": ViewBox,
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, fn := range cases {
|
for name, fn := range cases {
|
||||||
|
Loading…
Reference in New Issue
Block a user