0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-12-19 08:41:18 +01:00
gitea/components/search_input.go
2025-05-27 20:25:07 -07:00

21 lines
412 B
Go

package components
import (
g "maragu.dev/gomponents"
gh "maragu.dev/gomponents/html"
)
func SearchInput(value, placeholder string, disabled bool) g.Node {
// Corresponds to templates/shared/search/input.tmpl
return gh.Input(
gh.Type("search"),
gh.Name("q"),
gh.MaxLength("255"),
g.Attr("spellcheck", "false"),
gh.Value(value),
gh.Placeholder(placeholder),
If(disabled, gh.Disabled()),
)
}