Documentation
¶
Index ¶
- func ComponentToString(c templ.Component) (string, error)
- func Markdown(markdown string) templ.Component
- func New[T any](defaultProps func() *T, tpl func(*T) templ.Component, props ...OptFunc[T]) templ.Component
- func NewWithProps[T any](tpl func(*T) templ.Component, props *T) templ.Component
- func Render(ctx echo.Context, status int, t templ.Component) error
- func Unsafe(html string) templ.Component
- func WithProps[T any](defaultProps func() *T, props ...OptFunc[T]) *T
- type BufferedResponseWriter
- type Component
- type OptFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New[T any](defaultProps func() *T, tpl func(*T) templ.Component, props ...OptFunc[T]) templ.Component
New creates a new templ.Component with the given props
func NewWithProps ¶
NewWithProps creates a new templ.Component with the given prop
Types ¶
type BufferedResponseWriter ¶ added in v0.0.4
type BufferedResponseWriter struct {
// contains filtered or unexported fields
}
func (*BufferedResponseWriter) Header ¶ added in v0.0.4
func (w *BufferedResponseWriter) Header() http.Header
func (*BufferedResponseWriter) SetCookie ¶ added in v0.0.4
func (w *BufferedResponseWriter) SetCookie(cookie *http.Cookie)
func (*BufferedResponseWriter) Write ¶ added in v0.0.4
func (w *BufferedResponseWriter) Write(b []byte) (int, error)
func (*BufferedResponseWriter) WriteHeader ¶ added in v0.0.4
func (w *BufferedResponseWriter) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.