// templui component modal - version: v0.84.0 installed by templui v0.84.0 package modal import "git.jmbit.de/jmb/scanfile/server/web/templui/utils" type Props struct { ID string Class string Attributes templ.Attributes DisableClickAway bool DisableESC bool InitialOpen bool } type TriggerProps struct { ID string Class string Attributes templ.Attributes Disabled bool For string // ID of the modal to trigger } type CloseProps struct { ID string Class string Attributes templ.Attributes For string // ID of the modal to close (optional, defaults to closest modal) } type HeaderProps struct { ID string Class string Attributes templ.Attributes } type BodyProps struct { ID string Class string Attributes templ.Attributes } type FooterProps struct { ID string Class string Attributes templ.Attributes } templ Modal(props ...Props) { {{ var p Props }} if len(props) > 0 { {{ p = props[0] }} } if p.ID == "" { {{ p.ID = "modal-" + utils.RandomID() }} } } templ Trigger(props ...TriggerProps) { {{ var p TriggerProps }} if len(props) > 0 { {{ p = props[0] }} } { children... } } templ Close(props ...CloseProps) { {{ var p CloseProps }} if len(props) > 0 { {{ p = props[0] }} } { children... } } templ Header(props ...HeaderProps) { {{ var p HeaderProps }} if len(props) > 0 { {{ p = props[0] }} }

// Ensure title ID matches aria-labelledby { children... }

} templ Body(props ...BodyProps) { {{ var p BodyProps }} if len(props) > 0 { {{ p = props[0] }} }
{ children... }
} templ Footer(props ...FooterProps) { {{ var p FooterProps }} if len(props) > 0 { {{ p = props[0] }} }
{ children... }
} templ Script() { }