// templui component slider - version: v0.84.0 installed by templui v0.84.0 package slider import ( "fmt" "git.jmbit.de/jmb/scanfile/server/web/templui/utils" ) type Props struct { ID string Class string Attributes templ.Attributes } type InputProps struct { ID string Class string Attributes templ.Attributes Name string Min int Max int Step int Value int Disabled bool } type ValueProps struct { ID string Class string Attributes templ.Attributes For string // Corresponds to the ID of the Slider Input } templ Slider(props ...Props) { {{ var p Props }} if len(props) > 0 { {{ p = props[0] }} }
{ children... }
} templ Input(props ...InputProps) { {{ var p InputProps }} if len(props) > 0 { {{ p = props[0] }} } if p.ID == "" { {{ p.ID = utils.RandomID() }} } } templ Value(props ...ValueProps) { {{ var p ValueProps }} if len(props) > 0 { {{ p = props[0] }} } if p.For == "" { Error: SliderValue missing 'For' attribute. } } templ Script() { }