wip
This commit is contained in:
18
web/assets/icons.go
Normal file
18
web/assets/icons.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package assets
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
g "maragu.dev/gomponents"
|
||||
h "maragu.dev/gomponents/html"
|
||||
)
|
||||
|
||||
func Icon(name string, size int) g.Node {
|
||||
return h.SVG(
|
||||
g.Attr("width", strconv.Itoa(size)),
|
||||
g.Attr("height", strconv.Itoa(size)),
|
||||
g.Attr("viewBox", "0 0 24 24"),
|
||||
g.Attr("fill", "currentColor"),
|
||||
Asset("svgs/"+name+".svg"),
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user