1
0
Fork 0
forked from goffee/core

Merge pull request 'develop' (#8) from develop into main

Reviewed-on: goffee/core#8
This commit is contained in:
Zeni Kim 2024-10-23 08:11:16 -04:00
commit 789a157571
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,8 @@
package components
type FormSwitch struct {
ID string
Label string
IsChecked bool
IsDisabled bool
}

View file

@ -0,0 +1,7 @@
{{define "form_switch"}}
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" name="{{.ID}}" id="{{.ID}}" {{if eq .IsChecked true}} checked{{end}} {{if eq .IsDisabled true}} disabled{{end}}>
<label class="form-check-label" for="{{.ID}}">{{.Label}}</label>
</div>
{{end}}