about summary refs log tree commit diff stats
path: root/components/elements.go
blob: c9e14271bfa38b9f42bbc9434cd0e6a16bc0a794 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package components

import (
	g "github.com/maragudk/gomponents"
	. "github.com/maragudk/gomponents/html"
)

func InputHidden(name, value string, children ...g.Node) g.Node {
	return Input(Type("hidden"), Name(name), Value(value), g.Group(children))
}

func LinkStylesheet(href string, children ...g.Node) g.Node {
	return Link(Rel("stylesheet"), Href(href), g.Group(children))
}

func LinkPreload(href, as string, children ...g.Node) g.Node {
	return Link(Rel("preload"), Href(href), As(as), g.Group(children))
}