// templui component input - version: v0.84.0 installed by templui v0.84.0 package input import ( "git.jmbit.de/jmb/scanfile/server/web/templui/components/button" "git.jmbit.de/jmb/scanfile/server/web/templui/components/icon" "git.jmbit.de/jmb/scanfile/server/web/templui/utils" ) type Type string const ( TypeText Type = "text" TypePassword Type = "password" TypeEmail Type = "email" TypeNumber Type = "number" TypeTel Type = "tel" TypeURL Type = "url" TypeSearch Type = "search" TypeDate Type = "date" TypeTime Type = "time" TypeFile Type = "file" ) type Props struct { ID string Class string Attributes templ.Attributes Name string Type Type Placeholder string Value string Disabled bool Readonly bool Required bool FileAccept string HasError bool NoTogglePassword bool } templ Input(props ...Props) { {{ var p Props }} if len(props) > 0 { {{ p = props[0] }} } if p.Type == "" { {{ p.Type = TypeText }} } if p.ID == "" { {{ p.ID = utils.RandomID() }} }