package ui // ButtonProps is the input to the Button templ component. // // Type defaults to "button" when empty. Attrs is a pass-through for arbitrary // attributes (notably hx-* HTMX attributes). type ButtonProps struct { Label string Variant ButtonVariant Tone ButtonTone Size Size Type string Attrs templ.Attributes } templ Button(props ButtonProps) { {{ btnType := props.Type }} if btnType == "" { {{ btnType = "button" }} } {{ class := ButtonClass(props.Variant, props.Tone, props.Size) }} }