features/client-side-settings #3

Merged
jtom38 merged 12 commits from features/client-side-settings into main 2024-04-14 19:40:30 -07:00
4 changed files with 28 additions and 4 deletions
Showing only changes of commit 9d88d649d1 - Show all commits

View File

@ -17,7 +17,3 @@ templ BootstrapAlert(message, variant string) {
{ message } { message }
</div> </div>
} }
templ BootstrapButton(message, variant string) {
<button type="button" class={ getButtonVariant(variant) }>{ message }</button>
}

View File

@ -0,0 +1,10 @@
package bootstrap
const (
ButtonTypeSubmit = "submit"
ButtonTypeDefault = "button"
)
templ BootstrapButton(message, variant, buttonType string) {
<button type={ buttonType } class={ getButtonVariant(variant) }>{ message }</button>
}

View File

@ -0,0 +1,5 @@
package bootstrap
templ Label(cssClass, name, cssForId, message string) {
<label class={ cssClass } name={ name } for={ cssForId }>{ message }</label>
}

View File

@ -0,0 +1,13 @@
package bootstrap
const (
SwitchTypeCheckbox = "checkbox"
)
templ Switch(name, switchType, cssId string, enabled bool) {
if enabled == true {
<input class="form-check-input" name={ name } type={ switchType } role="switch" id={ cssId } checked/>
} else {
<input class="form-check-input" name={ name } type={ switchType } role="switch" id={ cssId }/>
}
}