newsbot-portal/components/bulma/form/input.templ

20 lines
587 B
Plaintext

package form
templ TextInput(id, fieldType, placeholder string) {
<input class={ "input" } name={ id } id={ id } type={ fieldType } placeholder={ placeholder }/>
}
templ TextInputColor(color, id, fieldType, placeholder string) {
if color == "" {
<input class={ "input" } name={ id } id={ id } type={ fieldType } placeholder={ placeholder }/>
} else {
<input class={ "input", color } name={ id } id={ id } type={ fieldType } placeholder={ placeholder }/>
}
}
templ Checkbox(text, id string) {
<label class="checkbox">
<input type="checkbox" id={ id }/> { text }
</label>
}