2024-07-11 08:08:58 -07:00
|
|
|
package form
|
|
|
|
|
2024-07-13 10:36:15 -07:00
|
|
|
templ TextInput(id, fieldType, placeholder string) {
|
|
|
|
<input class={ "input" } name={ id } id={ id } type={ fieldType } placeholder={ placeholder }/>
|
|
|
|
}
|
|
|
|
|
|
|
|
templ TextInputColor(color, id, fieldType, placeholder string) {
|
2024-07-11 08:08:58 -07:00
|
|
|
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>
|
|
|
|
}
|