xtablo-source/backend/internal/web/ui/textarea.templ

30 lines
538 B
Text
Raw Normal View History

package ui
type TextareaProps struct {
ID string
Name string
Value string
Placeholder string
Rows int
Disabled bool
Required bool
Attrs templ.Attributes
}
templ Textarea(props TextareaProps) {
<textarea
id={ inputID(props.ID, props.Name) }
name={ props.Name }
placeholder={ props.Placeholder }
rows={ textareaRows(props.Rows) }
class="ui-textarea"
if props.Disabled {
disabled
}
if props.Required {
required
}
{ props.Attrs... }
>{ props.Value }</textarea>
}